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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243148 Number T(n,k) of partitions of n into k nonzero squares; triangle T(n,k), n>=0, 0<=k<=n, read by rows. 12
1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0

LINKS

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

EXAMPLE

Triangle T(n,k) begins:

1;

0, 1;

0, 0, 1;

0, 0, 0, 1;

0, 1, 0, 0, 1;

0, 0, 1, 0, 0, 1;

0, 0, 0, 1, 0, 0, 1;

0, 0, 0, 0, 1, 0, 0, 1;

0, 0, 1, 0, 0, 1, 0, 0, 1;

0, 1, 0, 1, 0, 0, 1, 0, 0, 1;

0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1;

0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1;

0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1;

MAPLE

b:= proc(n, i, k, t) option remember; `if`(n=0, `if`(t=0, 1, 0),

      `if`(i<1 or t<1, 0, b(n, i-1, k, t)+

      `if`(i^2>n, 0, b(n-i^2, i, k, t-1))))

    end:

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

seq(seq(T(n, k), k=0..n), n=0..14);

MATHEMATICA

b[n_, i_, k_, t_] := b[n, i, k, t] = If[n == 0, If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i-1, k, t] + If[i^2 > n, 0, b[n-i^2, i, k, t-1]]]]; T[n_, k_] := b[n, Sqrt[n] // Floor, k, k]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jun 06 2014, after Alois P. Heinz *)

T[n_, k_] := Count[PowersRepresentations[n, k, 2], r_ /; FreeQ[r, 0]]; T[0, 0] = 1; Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 19 2016 *)

CROSSREFS

Columns k=0-10 give: A000007, A010052 (for n>0), A025426, A025427, A025428, A025429, A025430, A025431, A025432, A025433, A025434.

T(2n,n) gives A111178(n).

Sequence in context: A266282 A228747 A285162 * A186518 A198517 A190227

Adjacent sequences:  A243145 A243146 A243147 * A243149 A243150 A243151

KEYWORD

nonn,tabl

AUTHOR

Alois P. Heinz, May 30 2014

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 18 23:26 EST 2018. Contains 299330 sequences. (Running on oeis4.)