Stern's Diatomic Series

Author

Eric W. Weisstein
August 4, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/SternsDiatomicSeries.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/SternsDiatomicSeries.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Plot

ListPlot[fusc/@Range[1000],AxesLabel->{n,HoldForm[fusc[n]]}]

Generating Function

x Product[1+(x^(2^k))+(x^(2^(k+1))),{k,0,∞}]

Factor[1+(x^(2^k))+(x^(2^(k+1)))]

Series[x Product[1+(x^(2^k))+(x^(2^(k+1))),{k,0,20}],{x,0,20}]

CoefficientList[%,x]

Sum

(∑_(k=0)^(n-1))(Binomial[k, -k+n-1]) mod 2

Sum[Mod[Binomial[k,n-k-1],2],{k,0,n-1}]

fusc=Sum[Mod[Binomial[K,#-K-1],2],{K,0,#-1}]&;

fusc[n]

fusc/@Range[20]

Recurrence

NestList[Flatten[Transpose[{#,#+RotateLeft[#]}]]&,{1},5]//Column

Recurrence

RSolve[{a[k]==If[Mod[k,2]==0,a[k/2],a[(k-1)/2]+a[k/2]],a[0]==0,a[1]==1},a[k],k]

a[0]:=0
a[1]:=1
a[k_]:=a[k]=If[Mod[k,2]==0,a[k/2],a[(k-1)/2]+a[(k+1)/2]]

a/@Range[10]

Table[If[EvenQ[n],1,0],{n,10}]