%I #49 Mar 06 2023 17:34:03
%S 0,1,7,13,49,55,91,127,343,349,385,421,637,673,889,1105,2401,2407,
%T 2443,2479,2695,2731,2947,3163,4459,4495,4711,4927,6223,6439,7735,
%U 9031,16807,16813,16849,16885,17101,17137,17353,17569,18865,18901,19117,19333
%N 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,....
%C A 7-divide version of A084230.
%C The Harborth: f(2^k) = 3^k suggests that a family of sequences of the form: f(2^k) = prime(n)^k.
%C From _Gary W. Adamson_, Aug 27 2016: (Start)
%C Let M = the production matrix below. Then lim_{k->infinity} M^k generates the sequence with offset 1 by extracting the left-shifted vector.
%C 1, 0, 0, 0, 0, ...
%C 7, 0, 0, 0, 0, ...
%C 6, 1, 0, 0, 0, ...
%C 0, 7, 0, 0, 0, ...
%C 0, 6, 1, 0, 0, ...
%C 0, 0, 7, 0, 0, ...
%C 0, 0, 6, 1, 0, ...
%C ...
%C The sequence divided by its aerated variant is (1, 7, 6, 0, 0, 0, ...). (End)
%H Alois P. Heinz, <a href="/A116522/b116522.txt">Table of n, a(n) for n = 0..16383</a> (first 2501 terms from G. C. Greubel)
%H H. Harborth, <a href="http://dx.doi.org/10.1090/S0002-9939-1977-0429714-1">Number of Odd Binomial Coefficients</a>, Proc. Amer. Math. Soc. 62, 19-22, 1977.
%H Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, pp. 27, 33.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Stolarsky-HarborthConstant.html">Stolarsky-Harborth Constant</a>
%F G.f.: (r(x) * r(x^2) * r(x^4) * r(x^8) * ...), where r(x) = (1 + 7x + 6x^2).
%F a(n) = Sum_{k=0..n-1} 6^wt(k), where wt = A000120. - _Mike Warburton_, Mar 14 2019
%F a(n) = Sum_{k=0..floor(log_2(n))} 6^k*A360189(n-1,k). - _Alois P. Heinz_, Mar 06 2023
%p 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);
%p # second Maple program:
%p b:= proc(n) option remember; `if`(n<0, 0,
%p b(n-1)+x^add(i, i=Bits[Split](n)))
%p end:
%p a:= n-> subs(x=6, b(n-1)):
%p seq(a(n), n=0..44); # _Alois P. Heinz_, Mar 06 2023
%t 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}]
%Y Cf. A000120, A006046, A077465, A130665, A116520, A130667, A161342, A360189.
%K nonn
%O 0,3
%A _Roger L. Bagula_, Mar 15 2006
%E Edited by _N. J. A. Sloane_, Apr 16 2005