login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072170 Square array T(n,k) (n >= 0, k >= 2) read by antidiagonals, where T(n,k) is the number of ways of writing n as Sum_{i>=0} c_i 2^i, c_i in {0,1,...,k-1}. 13
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 2, 1, 1, 1, 2, 3, 2, 2, 1, 1, 1, 3, 3, 4, 2, 2, 1, 1, 1, 1, 4, 3, 4, 2, 2, 1, 1, 1, 4, 4, 5, 4, 4, 2, 2, 1, 1, 1, 3, 5, 4, 5, 4, 4, 2, 2, 1, 1, 1, 5, 5, 8, 5, 6, 4, 4, 2, 2, 1, 1, 1, 2, 6, 6, 8, 5, 6, 4, 4, 2, 2, 1, 1, 1, 5, 6, 9, 8, 9, 6, 6, 4, 4, 2, 2, 1, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,8

COMMENTS

k-th column is k-th binary partition function.

The sequence data corresponds (via the table link) to the transpose of the array shown in example and given by the definition. - M. F. Hasler, Feb 14 2019

REFERENCES

B. Reznick, Some binary partition functions, 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.

LINKS

Alois P. Heinz, Antidiagonals n = 0..140, flattened

FORMULA

T(n,k) = T(n,n+1) = T(n,n)+1 = A000123(floor(n/2)) for all k >= n+1. - M. F. Hasler, Feb 14 2019

EXAMPLE

Array begins: (rows n >= 0, columns k >= 2)

1 1 1 1 1 1 1 1 ...

1 1 1 1 1 1 1 1 ...

1 2 2 2 2 2 2 2 ...

1 1 2 2 2 2 2 2 ...

1 3 3 4 4 4 4 4 ...

1 2 3 3 4 4 4 4 ...

1 3 4 5 5 6 6 6 ...

MAPLE

b:= proc(n, i, k) option remember;

      `if`(n=0, 1, `if`(i<0, 0, add(`if`(n-j*2^i<0, 0,

         b(n-j*2^i, i-1, k)), j=0..k-1)))

    end:

T:= (n, k)-> b(n, ilog2(n), k):

seq(seq(T(d+2-k, k), k=2..d+2), d=0..14); # Alois P. Heinz, Jun 21 2012

MATHEMATICA

b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 0, 0, Sum[If[n-j*2^i < 0, 0, b[n-j*2^i, i-1, k]], {j, 0, k-1}]]]; t[n_, k_] := b[n, Log[2, n] // Floor, k]; Table[Table[t[d+2-k, k], {k, 2, d+2}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Jan 14 2014, translated from Alois P. Heinz's Maple code *)

PROG

(PARI) M72170=[[]]; A072170(n, k, i=logint(n+!n, 2), r=1)={if( !i, k>n, r&&(k<5||k>=n), if(k>4, A000123(n\2)-(k==n), k<3, 1, k<4, A002487(n), n\2+1), M72170[r=setsearch(M72170, [n, k, i, ""], 1)-1][^-1]==[n, k, i], M72170[r][4], M72170=setunion(M72170, [[n, k, i, r=sum(j=0, min(k-1, n>>i), A072170(n-j*2^i, k, i-1, 0))]]); r)} \\ Code for k<5 (using A002487 for k=3) and k>=n (using A000123) is optional but makes it about 3x faster. - M. F. Hasler, Feb 14 2019

CROSSREFS

k=3 column is A002487, k=4 is A008619 (positive integers repeated), k = 5, 6, 7 are A007728, A007729, A007730, limiting (infinity) column is A000123 doubled up.

Sequence in context: A133912 A277231 A122934 * A294932 A056624 A193348

Adjacent sequences:  A072167 A072168 A072169 * A072171 A072172 A072173

KEYWORD

nonn,tabl

AUTHOR

N. J. A. Sloane, Jun 29 2002

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 May 25 15:24 EDT 2019. Contains 323572 sequences. (Running on oeis4.)