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.

Showing 1-5 of 5 results.

A122141 Array: T(d,n) = number of ways of writing n as a sum of d squares, read by ascending antidiagonals.

Original entry on oeis.org

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
Offset: 1

Views

Author

R. J. Mathar, Oct 29 2006

Keywords

Comments

This is the transpose of the array in A286815.
T(d,n) is divisible by 2d for any n != 0 iff d is a power of 2. - Jianing Song, Sep 05 2018

Examples

			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 ...
		

Crossrefs

Cf. A000122 (1st row), A004018 (2nd row), A005875 (3rd row), A000118 (4th row), A000132 (5th row), A000141 (6th row), A008451 (7th row), A000143 (8th row), A008452 (9th row), A000144 (10th row), A008453 (11th row), A000145 (12th row), A276285 (13th row), A276286 (14th row), A276287 (15th row), A000152 (16th row).
Cf. A005843 (2nd column), A046092 (3rd column), A130809 (4th column).
Cf. A010052 (1st row divides 2), A002654 (2nd row divides 4), A046897 (4th row divides 8), A008457 (8th row divides 16), A302855 (16th row divides 32), A302857 (32nd row divides 64).

Programs

  • 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 *)
  • Python
    from sympy.core.power import isqrt
    from functools import cache
    @cache
    def T(d, n):
      if n == 0: return 1
      if n < 0 or d < 1: return 0
      return T(d-1, n) + sum(T(d-1, n-(j**2)) for j in range(1, isqrt(n)+1)) * 2  # Darío Clavijo, Feb 06 2024

Formula

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

A286815 Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of (Product_{j>=1} (1 - x^(2*j))^5/((1 - x^j)*(1 - x^(4*j)))^2)^k.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 4, 0, 0, 1, 6, 4, 0, 0, 1, 8, 12, 0, 2, 0, 1, 10, 24, 8, 4, 0, 0, 1, 12, 40, 32, 6, 8, 0, 0, 1, 14, 60, 80, 24, 24, 0, 0, 0, 1, 16, 84, 160, 90, 48, 24, 0, 0, 0, 1, 18, 112, 280, 252, 112, 96, 0, 4, 2, 0, 1, 20, 144, 448, 574, 312, 240, 64, 12
Offset: 0

Views

Author

Seiichi Manyama, May 27 2017

Keywords

Comments

A(n,k) is the number of ways of writing n as a sum of k squares.
This is the transpose of the array in A122141.

Examples

			Square array begins:
   1, 1, 1,  1,  1, ...
   0, 2, 4,  6,  8, ...
   0, 0, 4, 12, 24, ...
   0, 0, 0,  8, 32, ...
   0, 2, 4,  6, 24, ...
		

Crossrefs

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          A(n, k-1) +2*add(A(n-j^2, k-1), j=1..isqrt(n))))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, May 27 2017
  • Mathematica
    A[n_, k_] := A[n, k] = If[n == 0, 1, If[n < 0 || k < 1, 0, A[n, k-1] + 2*Sum[A[n-j^2, k-1], {j, 1, Sqrt[n]}]]];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 28 2018, after Alois P. Heinz *)

Formula

G.f. of column k: (Product_{j>=1} (1 - x^(2*j))^5/((1 - x^j)*(1 - x^(4*j)))^2)^k.

A276286 Number of ways of writing n as a sum of 14 squares.

Original entry on oeis.org

1, 28, 364, 2912, 16044, 64792, 200928, 503360, 1089452, 2186940, 4196920, 7544992, 12547808, 19975256, 31553344, 48484800, 70439852, 99602104, 142487436, 200569824, 268594872, 354052608, 476105504, 630908096, 800698080, 1008274932, 1296257144
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 27 2016

Keywords

Crossrefs

Cf. similar sequences of number of ways of writing n as a sum of k squares listed in A276285.
14th column of A286815.

Programs

  • Mathematica
    Table[SquaresR[14, n], {n, 0, 26}]

Formula

G.f.: theta_3(0,q)^14, where theta_3(x,q) is the third Jacobi theta function.

A276287 Number of ways of writing n as a sum of 15 squares.

Original entry on oeis.org

1, 30, 420, 3640, 21870, 96936, 331240, 911040, 2128260, 4495430, 8972712, 16946280, 29822520, 49476840, 80027280, 127083328, 193511790, 282611280, 409172940, 590913960, 825736296, 1115671760, 1509537960, 2048372160, 2698852520, 3463029894
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 27 2016

Keywords

Crossrefs

Cf. similar sequences of number of ways of writing n as a sum of k squares listed in A276285.
15th column of A286815.

Programs

  • Mathematica
    Table[SquaresR[15, n], {n, 0, 28}]

Formula

G.f.: theta_3(0,q)^15, where theta_3(x,q) is the third Jacobi theta function.

A004414 Expansion of (Sum_{n=-inf..inf} x^(n^2))^(-13).

Original entry on oeis.org

1, -26, 364, -3640, 29094, -197288, 1177176, -6333184, 31258604, -143374530, 617193304, -2513060264, 9739727816, -36115518376, 128680223152, -442158402816, 1469734751654, -4738671343952, 14853923411652
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 30; CoefficientList[Series[Product[((1 + (-x)^k)/(1 - (-x)^k))^13, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 18 2015 *)

Formula

a(n) ~ (-1)^n * exp(Pi*sqrt(m*n)) * m^((m+1)/4) / (2^(3*(m+1)/2) * n^((m+3)/4)), set m = 13 for this sequence. - Vaclav Kotesovec, Aug 18 2015
From Ilya Gutkovskiy, Sep 20 2018: (Start)
G.f.: 1/theta_3(x)^13, where theta_3() is the Jacobi theta function.
G.f.: Product_{k>=1} 1/((1 - x^(2*k))*(1 + x^(2*k-1))^2)^13. (End)
Showing 1-5 of 5 results.