cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A007729 6th binary partition function.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 13, 14, 18, 21, 26, 28, 33, 36, 40, 41, 46, 50, 57, 60, 68, 73, 80, 82, 89, 94, 102, 105, 112, 116, 121, 122, 128, 133, 142, 146, 157, 164, 174, 177, 188, 196, 209, 214, 226, 233, 242, 244, 253, 260, 272, 277, 290, 298, 309, 312, 322, 329, 340, 344
Offset: 0

Views

Author

Keywords

Comments

From Gary W. Adamson, Aug 31 2016: (Start)
The sequence is the left-shifted vector of the production matrix M, with lim_{k->infinity} M^k. M =
1, 0, 0, 0, 0, ...
2, 0, 0, 0, 0, ...
2, 1, 0, 0, 0, ...
1, 2, 0, 0, 0, ...
0, 2, 1, 0, 0, ...
0, 1, 2, 0, 0, ...
0, 0, 2, 1, 0, ...
0, 0, 1, 2, 0, ...
...
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, ...).
Term a((2^n) - 1) = A007051: (1, 2, 5, 14, 41, 122, ...). (End)
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

Crossrefs

A column of A072170.
Apart from an initial zero, coincides with A174868.

Programs

  • Maple
    b:= proc(n) option remember;
          `if`(n<2, n, `if`(irem(n, 2)=0, b(n/2), b((n-1)/2) +b((n+1)/2)))
        end:
    a:= proc(n) option remember;
          b(n+1) +`if`(n>0, a(n-1), 0)
        end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Jun 21 2012
  • Mathematica
    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 *)
  • Python
    from itertools import accumulate, count, islice
    from functools import reduce
    def A007729_gen(): # generator of terms
        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))
    A007729_list = list(islice(A007729_gen(),30)) # Chai Wah Wu, May 07 2023

Formula

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
a(2k) = 2*a(k-1) + a(k); a(2k+1) = 2*a(k) + a(k-1). - Michael J. Collins, Dec 25 2018

Extensions

More terms from Vladeta Jovovic, May 06 2004