login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A116528 a(0)=0, a(1)=1, and for n>=2, a(2*n) = a(n), a(2*n+1) = 2*a(n) + a(n+1). 7
0, 1, 1, 3, 1, 5, 3, 7, 1, 7, 5, 13, 3, 13, 7, 15, 1, 9, 7, 19, 5, 23, 13, 29, 3, 19, 13, 33, 7, 29, 15, 31, 1, 11, 9, 25, 7, 33, 19, 43, 5, 33, 23, 59, 13, 55, 29, 61, 3, 25, 19, 51, 13, 59, 33, 73, 7, 43, 29, 73, 15, 61, 31, 63, 1, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Equals row 2 of the array in A178239, an infinite set of sequences of the form a(n) = a(2n), a(2n+1) = r*a(n) + a(n+1). - Gary W. Adamson, May 23 2010

Given an infinite lower triangular matrix M with (1, 1, 2, 0, 0, 0,...) in every column, shifted down twice for columns k>1; Lim_{n->inf} M^n = A116528, the left-shifted vector considered as a sequence with offset 1. - Gary W. Adamson, May 05 2010

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..2500

H. Harborth, Number of Odd Binomial Coefficients, Proc. Amer. Math. Soc. 62, 19-22, 1977.

Eric Weisstein's World of Mathematics, Stolarsky-Harborth Constant

FORMULA

G.f.: x * Product_{k>=0} (1 + x^(2^k) + 2*x^(2^(k+1))). - Ilya Gutkovskiy, Jul 07 2019

MAPLE

A116528 := proc(n)

   option remember;

   if n <= 1 then

      n;

   elif type(n, 'even') then

      procname(n/2) ;

   else

      2* procname((n-1)/2)+procname((n+1)/2) ;

   end if;

end proc:

seq(A116528(n), n=0..70) ; # R. J. Mathar, Nov 16 2011

MATHEMATICA

b[0]:= 0; b[1]:= 1; b[n_?EvenQ]:= b[n] = b[n/2]; b[n_?OddQ]:= b[n] = 2*b[(n-1)/2] + b[(n+1)/2]; a = Table[b[n], {n, 1, 70}]

PROG

(PARI) a(n) = if(n<2, n, if(n%2==0, a(n/2), 2*a((n-1)/2) + a((n+1)/2))); \\ G. C. Greubel, Jul 07 2019

(MAGMA)

a:=func< n | n lt 2 select n else ((n mod 2) eq 0) select Self(Round((n+1)/2)) else (2*Self(Round(n/2)) + Self(Round((n+2)/2))) >;

[a(n): n in [0..70]]; // G. C. Greubel, Jul 07 2019

(Sage)

def a(n):

    if (n<2): return n

    elif (mod(n, 2)==0): return a(n/2)

    else: return 2*a((n-1)/2) + a((n+1)/2)

[a(n) for n in (0..70)] # G. C. Greubel, Jul 07 2019

CROSSREFS

Cf. A006046, A116529, A116552, A116553, A116554, A116555.

Sequence in context: A204455 A318653 A161820 * A081431 A053641 A161825

Adjacent sequences:  A116525 A116526 A116527 * A116529 A116530 A116531

KEYWORD

nonn,easy

AUTHOR

Roger L. Bagula, Mar 15 2006

EXTENSIONS

Edited by G. C. Greubel, Oct 30 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 26 05:00 EDT 2020. Contains 337346 sequences. (Running on oeis4.)