|
|
|
|
1, 1, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 1, 2, 1, 4, 1, 2, 1, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
For n >= 1, a(n) = 2^max_{odd k=1..n} (A007814(k+1) - t(n,k) - delta(n,k)), where delta(n,k) is the Kronecker symbol: delta(i,j) is 1 if i=j and 0 otherwise, and t(n,k) is the number of carries which appear in the addition of k and n-k in base 2. This allows us to answer in the affirmative the author's question (for a proof see Shevelev's link and its continuations). - Vladimir Shevelev, Aug 15 2017
|
|
MAPLE
|
a := n -> `if`(n=1 or n mod 2 = 0, 1, 2*a(iquo(n, 2))):
|
|
MATHEMATICA
|
b[n_] := b[n] = Which[n==0, 1, n==1, 1, EvenQ[n], 1, True, b[(n-1)/2] + 1]; a[n_] := 2^(b[n+1]-1); Array[a, 103, 0] (* Jean-François Alcover, Aug 12 2017 *)
|
|
PROG
|
|
|
CROSSREFS
|
This is Guy Steele's sequence GS(2, 5) (see A135416).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|