A116522 a(0)=1, a(1)=1, a(n)=7*a(n/2) for n=2,4,6,..., a(n)=6*a((n-1)/2)+a((n+1)/2) for n=3,5,7,....
0, 1, 7, 13, 49, 55, 91, 127, 343, 349, 385, 421, 637, 673, 889, 1105, 2401, 2407, 2443, 2479, 2695, 2731, 2947, 3163, 4459, 4495, 4711, 4927, 6223, 6439, 7735, 9031, 16807, 16813, 16849, 16885, 17101, 17137, 17353, 17569, 18865, 18901, 19117, 19333
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..16383 (first 2501 terms from G. C. Greubel)
- H. Harborth, Number of Odd Binomial Coefficients, Proc. Amer. Math. Soc. 62, 19-22, 1977.
- Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, pp. 27, 33.
- Eric Weisstein's World of Mathematics, Stolarsky-Harborth Constant
Programs
-
Maple
a:=proc(n) if n=0 then 0 elif n=1 then 1 elif n mod 2 = 0 then 7*a(n/2) else 6*a((n-1)/2)+a((n+1)/2) fi end: seq(a(n),n=0..47); # second Maple program: b:= proc(n) option remember; `if`(n<0, 0, b(n-1)+x^add(i, i=Bits[Split](n))) end: a:= n-> subs(x=6, b(n-1)): seq(a(n), n=0..44); # Alois P. Heinz, Mar 06 2023
-
Mathematica
b[0] := 0; b[1] := 1; b[n_?EvenQ] := b[n] = 7*b[n/2]; b[n_?OddQ] := b[n] = 6*b[(n - 1)/2] + b[(n + 1)/2]; a = Table[b[n], {n, 1, 25}]
Formula
G.f.: (r(x) * r(x^2) * r(x^4) * r(x^8) * ...), where r(x) = (1 + 7x + 6x^2).
a(n) = Sum_{k=0..n-1} 6^wt(k), where wt = A000120. - Mike Warburton, Mar 14 2019
a(n) = Sum_{k=0..floor(log_2(n))} 6^k*A360189(n-1,k). - Alois P. Heinz, Mar 06 2023
Extensions
Edited by N. J. A. Sloane, Apr 16 2005
Comments