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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122141 Array: T(d,n) = number of ways of writing n as a sum of d squares, read along diagonals. 24
1, 1, 2, 1, 4, 0, 1, 6, 4, 0, 1, 8, 12, 0, 2, 1, 10, 24, 8, 4, 0, 1, 12, 40, 32, 6, 8, 0, 1, 14, 60, 80, 24, 24, 0, 0, 1, 16, 84, 160, 90, 48, 24, 0, 0, 1, 18, 112, 280, 252, 112, 96, 0, 4, 2, 1, 20, 144, 448, 574, 312, 240, 64, 12, 4, 0, 1, 22, 180, 672, 1136, 840, 544, 320, 24, 30, 8, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

This is the transpose of the array in A286815.

LINKS

Alois P. Heinz, Antidiagonals d = 1..141, flattened

Index entries for sequences related to sums of squares

FORMULA

T(1,n)=A000122(n); T(2,n)=A004018(n); T(3,n)=A005875(n); T(4,n)=A000118(n); T(5,n)=A000132(n); T(6,n)=A000141(n); T(7,n)=A008451(n); T(8,n)=A000143(n); T(9,n)=A008452(n); T(10,n)=A000144(n); T(d,0)=1; T(d,1)=A005843(d); T(d,2)=A046092(d).

T(n,n) = A066535(n). - Alois P. Heinz, Jul 16 2014

EXAMPLE

Array T(d,n) with rows d=1,2,3... and columns n=0,1,2,3.. reads

1 2 0 0 2 0 0 0 0 2 0 ...

1 4 4 0 4 8 0 0 4 4 8 ...

1 6 12 8 6 24 24 0 12 30 24 ...

1 8 24 32 24 48 96 64 24 104 144 ...

1 10 40 80 90 112 240 320 200 250 560 ...

1 12 60 160 252 312 544 960 1020 876 1560 ...

1 14 84 280 574 840 1288 2368 3444 3542 4424 ...

1 16 112 448 1136 2016 3136 5504 9328 12112 14112 ...

1 18 144 672 2034 4320 7392 12672 22608 34802 44640 ...

1 20 180 960 3380 8424 16320 28800 52020 88660 129064

MAPLE

A122141 := proc(d, n) local i, cnts ; cnts := 0 ; for i from -trunc(sqrt(n)) to trunc(sqrt(n)) do if n-i^2 >= 0 then if d > 1 then cnts := cnts+procname(d-1, n-i^2) ; elif n-i^2 = 0 then cnts := cnts+1 ; fi ; fi ; od ; cnts ;

end:

for diag from 1 to 14 do for n from 0 to diag-1 do d := diag-n ; printf("%d, ", A122141(d, n)) ; od ; od;

# second Maple program:

A:= proc(d, n) option remember; `if`(n=0, 1, `if`(n<0 or d<1, 0,

      A(d-1, n) +2*add(A(d-1, n-j^2), j=1..isqrt(n))))

    end:

seq(seq(A(h-n, n), n=0..h-1), h=1..14); # Alois P. Heinz, Jul 16 2014

MATHEMATICA

Table[ SquaresR[d - n, n], {d, 1, 12}, {n, 0, d - 1}] // Flatten (* Jean-François Alcover, Jun 13 2013 *)

A[d_, n_] := A[d, n] = If[n==0, 1, If[n<0 || d<1, 0, A[d-1, n] + 2*Sum[A[d-1, n-j^2], {j, 1, Sqrt[n]}]]]; Table[A[h-n, n], {h, 1, 14}, {n, 0, h-1}] // Flatten (* Jean-François Alcover, Feb 28 2018, after Alois P. Heinz *)

CROSSREFS

Cf. A066535, A286815.

Sequence in context: A016585 A143316 A127192 * A091604 A200192 A137629

Adjacent sequences:  A122138 A122139 A122140 * A122142 A122143 A122144

KEYWORD

nonn,tabl

AUTHOR

R. J. Mathar, Oct 29 2006

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 May 22 09:23 EDT 2018. Contains 304407 sequences. (Running on oeis4.)