The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007729 6th binary partition function. 4

%I #57 May 08 2023 03:25:07

%S 1,2,4,5,8,10,13,14,18,21,26,28,33,36,40,41,46,50,57,60,68,73,80,82,

%T 89,94,102,105,112,116,121,122,128,133,142,146,157,164,174,177,188,

%U 196,209,214,226,233,242,244,253,260,272,277,290,298,309,312,322,329,340,344

%N 6th binary partition function.

%C From _Gary W. Adamson_, Aug 31 2016: (Start)

%C The sequence is the left-shifted vector of the production matrix M, with lim_{k->infinity} M^k. M =

%C 1, 0, 0, 0, 0, ...

%C 2, 0, 0, 0, 0, ...

%C 2, 1, 0, 0, 0, ...

%C 1, 2, 0, 0, 0, ...

%C 0, 2, 1, 0, 0, ...

%C 0, 1, 2, 0, 0, ...

%C 0, 0, 2, 1, 0, ...

%C 0, 0, 1, 2, 0, ...

%C ...

%C The sequence is equal to the product of its aerated variant by (1,2,2,1): (1, 2, 2, 1) * (1, 0, 2, 0, 4, 0, 5, 0, 8, ...) = (1, 2, 4, 5, 8, 10, ...).

%C Term a((2^n) - 1) = A007051: (1, 2, 5, 14, 41, 122, ...). (End)

%C a(n) is the number of ways to represent 2n (or 2n+1) as a sum e_0 + 2*e_1 + ... + (2^k)*e_k with each e_i in {0,1,2,3,4,5}. - _Michael J. Collins_, Dec 25 2018

%H Alois P. Heinz, <a href="/A007729/b007729.txt">Table of n, a(n) for n = 0..10000</a>

%H Michael J. Collins and David Wilson, <a href="https://arxiv.org/abs/1812.11174">Equivalence of OEIS A007729 and A174868</a>, arXiv:1812.11174 [math.CO], 2018.

%H B. Reznick, <a href="http://dx.doi.org/10.1007/978-1-4612-3464-7_29">Some binary partition functions</a>, in "Analytic number theory" (Conf. in honor P. T. Bateman, Allerton Park, IL, 1989), 451-477, Progr. Math., 85, Birkhäuser Boston, Boston, MA, 1990.

%F G.f.: (r(x) * r(x^2) * r(x^4) * r(x^8) * ...) where r(x) = (1 + 2x + 2x^2 + x^3 + 0 + 0 + 0 + ...). - _Gary W. Adamson_, Sep 01 2016

%F a(2k) = 2*a(k-1) + a(k); a(2k+1) = 2*a(k) + a(k-1). - _Michael J. Collins_, Dec 25 2018

%p b:= proc(n) option remember;

%p `if`(n<2, n, `if`(irem(n, 2)=0, b(n/2), b((n-1)/2) +b((n+1)/2)))

%p end:

%p a:= proc(n) option remember;

%p b(n+1) +`if`(n>0, a(n-1), 0)

%p end:

%p seq(a(n), n=0..70); # _Alois P. Heinz_, Jun 21 2012

%t b[n_] := b[n] = If[n<2, n, If[Mod[n, 2] == 0, b[n/2], b[(n-1)/2]+b[(n+1)/2]]]; a[n_] := a[n] = b[n+1] + If[n>0, a[n-1], 0]; Table[a[n], {n, 0, 70}] (* _Jean-François Alcover_, Mar 17 2014, after _Alois P. Heinz_ *)

%o (Python)

%o from itertools import accumulate, count, islice

%o from functools import reduce

%o def A007729_gen(): # generator of terms

%o return accumulate(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0))) for n in count(1))

%o A007729_list = list(islice(A007729_gen(),30)) # _Chai Wah Wu_, May 07 2023

%Y A column of A072170.

%Y Cf. A002487, A007051.

%Y Apart from an initial zero, coincides with A174868.

%K nonn

%O 0,2

%A _N. J. A. Sloane_

%E More terms from _Vladeta Jovovic_, May 06 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 18 16:58 EDT 2024. Contains 372664 sequences. (Running on oeis4.)