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-10 of 10 results.

A045847 Matrix whose (i,j)-th entry is number of representations of j as a sum of i squares of nonnegative integers; read by diagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 1, 0, 0, 1, 4, 3, 0, 1, 0, 1, 5, 6, 1, 2, 0, 0, 1, 6, 10, 4, 3, 2, 0, 0, 1, 7, 15, 10, 5, 6, 0, 0, 0, 1, 8, 21, 20, 10, 12, 3, 0, 0, 0, 1, 9, 28, 35, 21, 21, 12, 0, 1, 1, 0, 1, 10, 36, 56, 42, 36, 30, 4, 3, 2, 0, 0, 1, 11, 45, 84, 78, 63, 61, 20, 6, 6, 2, 0, 0
Offset: 0

Views

Author

Keywords

Examples

			Rows are
1,0,0,..;
1,1,0,0,1,0..;
1,2,1,0,2,2,..;
1,3,3,1,...
		

Crossrefs

Diagonal gives A287617.
Antidiagonal sums give A302018.

Formula

i-th row is expansion of (1+x+x^4+x^9+...)^i.

Extensions

More terms from Erich Friedman

A224213 Number of nonnegative solutions to x^2 + y^2 + z^2 + u^2 <= n.

Original entry on oeis.org

1, 5, 11, 15, 20, 32, 44, 48, 54, 70, 88, 100, 108, 124, 148, 160, 165, 189, 219, 235, 253, 281, 305, 317, 329, 357, 399, 427, 439, 475, 523, 539, 545, 581, 623, 659, 688, 716, 764, 792, 810, 858, 918, 946, 970, 1030, 1078, 1102, 1110, 1154, 1226, 1274, 1304, 1352
Offset: 0

Views

Author

Alex Ratushnyak, Apr 01 2013

Keywords

Crossrefs

Cf. A014110 (first differences).
Cf. A224212 (number of nonnegative solutions to x^2 + y^2 <= n).
Cf. A000606 (number of nonnegative solutions to x^2 + y^2 + z^2 <= n).
Cf. A046895 (number of integer solutions to x^2 + y^2 + z^2 + u^2 <= n).

Programs

  • Mathematica
    nn = 50; t = Table[0, {nn}]; Do[d = x^2 + y^2 + z^2 + u^2; If[0 < d <= nn, t[[d]]++], {x, 0, nn}, {y, 0, nn}, {z, 0, nn}, {u, 0, nn}]; Accumulate[Join[{1}, t]] (* T. D. Noe, Apr 01 2013 *)
  • Python
    for n in range(99):
      k = 0
      for x in range(99):
        s = x*x
        if s>n: break
        for y in range(99):
            sy = s + y*y
            if sy>n: break
            for z in range(99):
                sz = sy + z*z
                if sz>n: break
                for u in range(99):
                  su = sz + u*u
                  if su>n: break
                  k+=1
      print(str(k), end=', ')

Formula

G.f.: (1/(1 - x))*(Sum_{k>=0} x^(k^2))^4. - Ilya Gutkovskiy, Mar 14 2017

A282288 Expansion of (Sum_{k>=0} x^(k^4))^19.

Original entry on oeis.org

1, 19, 171, 969, 3876, 11628, 27132, 50388, 75582, 92378, 92378, 75582, 50388, 27132, 11628, 3876, 988, 513, 2926, 15505, 58140, 162792, 352716, 604656, 831402, 923780, 831402, 604656, 352716, 162792, 58140, 15504, 3078, 3249, 23275, 116280, 406980, 1058148, 2116296, 3325608, 4157010, 4157010, 3325608
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 12 2017

Keywords

Comments

Number of ways to write n as an ordered sum of 19 fourth powers (A000583).
a(n) > 0 for all n >= 0.
Every natural number is the sum of at most 19 fourth powers (Balasubramanian, 1986).

Crossrefs

Programs

  • Mathematica
    nmax = 42; CoefficientList[Series[Sum[x^k^4, {k, 0, nmax}]^19, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k>=0} x^(k^4))^19.

A347803 Expansion of ( Sum_{k>=0} k^2 * q^(k^2) )^4.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 16, 0, 0, 96, 0, 36, 256, 0, 432, 256, 0, 1728, 64, 486, 2304, 768, 3888, 0, 3072, 7776, 1728, 7112, 0, 13824, 12864, 0, 27648, 6336, 15552, 9261, 18688, 62208, 21744, 24576, 0, 72576, 51456, 24300, 117504, 38400, 101088, 9216, 93184, 155520, 86400, 142382, 62208, 352512, 67344, 0, 202752, 286176
Offset: 0

Views

Author

Seiichi Manyama, Sep 14 2021

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(i=1, n, sum(j=1, n, sum(k=1, n, sum(m=1, n, (i^2+j^2+k^2+m^2==n)*(i*j*k*m)^2))));
    
  • PARI
    my(N=66, x='x+O('x^N)); concat([0, 0, 0, 0], Vec(sum(k=0, sqrtint(N), k^2*x^k^2)^4))

Formula

a(n) is sum of i^2 * j^2 * k^2 *m^2 for positive integers i,j,k,m such that i^2+j^2+k^2+m^2=n.

A123337 Number of ordered ways to write n as the sum of 5 squares less than 5^2.

Original entry on oeis.org

1, 5, 10, 10, 10, 21, 30, 20, 15, 35, 50, 40, 30, 45, 70, 60, 30, 55, 100, 80, 56, 90, 110, 80, 60, 85, 120, 100, 60, 90, 130, 80, 35, 90, 120, 80, 65, 85, 90, 60, 35, 60, 90, 50, 30, 61, 60, 20, 10, 50, 40, 30, 25, 20, 30, 0, 10, 20, 20, 10, 0, 20, 0, 0, 5, 5, 10, 0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Jonathan Vos Post, Oct 11 2006

Keywords

Comments

Through n = 24, a(n) = number of ordered ways to write n as the sum of 5 squares. For n > 24, we must exclude sums which include 5^2, 6^2 and the like. The values of n such that a(n) = 0 are 55, 60, 62, 63, 67, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79 and all n > 80. Without the restriction on the size of squares, all natural numbers can be written as the sum of 4 squares, as Lagrange proved in 1750.

Examples

			a(0) = 1 because the unique such sum is 0 = 0^2 + 0^2 + 0^2 + 0^2 + 0^2.
a(1) = 5 because there are 5 permutations of 1 = 1^2 + 0^2 + 0^2 + 0^2 + 0^2, such as 1 = 0^2 + 1^2 + 0^2 + 0^2 + 0^2.
a(2) = 10 because there are 10 permutations of 2 = 1^2 + 1^2 + 0^2 + 0^2 + 0^2, such as 2 = 1^2 + 0^2 + 1^2 + 0^2 + 0^2.
a(5) = 21 because of the unique sum 5 = 1^2 + 1^2 + 1^2 + 1^2 + 1^2 and also 20 permutations of 5 = 2^2 + 1^2 + 0^2 + 0^2 + 0^2.
a(16) = 30 because there are 5 permutations of 16 = 4^2 + 0^2 + 0^2 + 0^2 + 0^2 and 5 permutations of 16 = 0^2 + 2^2 + 2^2 + 2^2 + 2^2 and 20 permutations of 16 = 3^2 + 2^2 + 1^2 + 1^2 + 1^2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[ Length /@ Permutations /@ IntegerPartitions[n, {5}, Range[0, 4]^2]]; a /@ Range[0, 80] (* Giovanni Resta, Jun 13 2016 *)

Extensions

23 terms corrected by Giovanni Resta, Jun 13 2016

A059160 Number of ordered ways of writing n as a sum of 5 generalized pentagonal numbers (A001318).

Original entry on oeis.org

1, 5, 15, 30, 45, 56, 65, 85, 115, 150, 171, 175, 185, 205, 260, 300, 325, 340, 350, 415, 440, 485, 500, 505, 580, 581, 650, 645, 675, 815, 815, 910, 845, 865, 985, 951, 1130, 1030, 1060, 1155, 1150, 1370, 1265, 1410, 1495, 1420, 1545, 1460, 1600, 1675, 1690
Offset: 0

Views

Author

Judson Neer, Feb 14 2001

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := SeriesCoefficient[(QPochhammer[-q, q^3]* QPochhammer[-q^2, q^3]*QPochhammer[q^3, q^3])^5, {q, 0, n}]; Table[a[n], {n, 0, 50}] (* G. C. Greubel, Jun 12 2017 *)

Formula

G.f.: f(x, x^2)^5 where f(,) is Ramanujan's two-variable theta function. - Michael Somos, Jun 08 2012

A123999 Number of ordered ways of writing n as a sum of 4 squares of nonnegative numbers less than 4.

Original entry on oeis.org

1, 4, 6, 4, 5, 12, 12, 4, 6, 16, 18, 12, 8, 16, 24, 12, 1, 12, 18, 12, 6, 4, 12, 12, 0, 0, 6, 4, 4, 0, 0, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Jonathan Vos Post, Oct 31 2006

Keywords

Comments

Through n = 15, a(n) = number of ordered ways to write n as the sum of 4 squares. For n > 15, we must exclude sums which include 4^2, 5^2, 6^2 and the like. The values of n such that a(n) = 0 are 16, 24, 25, 29, 30, 32, 33, 34, 35 and all n > 36. Without the restriction on the size of squares, all natural numbers can be written as the sum of 4 squares, as Lagrange proved in 1750. This sequence is to 4 as A123337 Number of ordered ways to write n as the sum of 5 squares less than 5, is to 5.

Examples

			a(0) = 1 because of the unique sum 0 = 0^2 + 0^2 + 0^2 + 0^2.
a(1) = 4 because of the 4 permutations 1 = 0^2 + 0^2 + 0^2 + 1^2 = 0^2 + 0^2 + 1^2 + 0^2 = 0^2 + 1^2 + 0^2 + 0^2 = 1^2 + 0^2 + 0^2 + 0^2.
a(4) = 5 because of 4 = 1^2 + 1^2 + 1^2 + 1^2 plus the 4 permutations of 4 = 0^2 + 0^2 + 0^2 + 2^2.
a(16) = 1 because 16 = 2^2 + 2^2 + 2^2 + 2^2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[ Length /@ Permutations /@ IntegerPartitions[n, {4}, Range[0, 3]^2]]; a /@ Range[0, 72] (* Giovanni Resta, Jun 13 2016 *)

Formula

a(n) = Card{(a,b,c,d) such that 0<=a,b,c,d<4 and a^2 + b^2 + c^2 + d^2 = n}.

Extensions

Corrected typo in third example Dave Zobel (dzobel(AT)alumni.caltech.edu), Mar 07 2009
a(16) and related example corrected by Giovanni Resta, Jun 13 2016

A317645 Expansion of (1 + theta_3(q))^3*(1 + theta_3(q^2))/16, where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 3, 4, 4, 6, 7, 6, 6, 7, 9, 12, 10, 10, 15, 10, 6, 12, 15, 16, 18, 16, 16, 18, 12, 12, 18, 24, 22, 24, 25, 10, 18, 19, 18, 30, 26, 24, 33, 30, 12, 24, 27, 30, 36, 28, 31, 24, 24, 22, 33, 32, 30, 42, 43, 36, 24, 34, 24, 48, 46, 24, 51, 34, 30, 36, 30, 34, 54, 48, 42, 48, 30, 37, 45, 54, 38
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 02 2018

Keywords

Comments

Number of nonnegative integer solutions to the equation x^2 + y^2 + z^2 + 2*w^2 = n.

Examples

			G.f. = 1 + 3*q + 4*q^2 + 4*q^3 + 6*q^4 + 7*q^5 + 6*q^6 + 6*q^7 + 7*q^8 + ...
		

Crossrefs

Programs

  • Mathematica
    nmax = 75; CoefficientList[Series[(1 + EllipticTheta[3, 0, q])^3 (1 + EllipticTheta[3, 0, q^2])/16, {q, 0, nmax}], q]
    nmax = 75; CoefficientList[Series[(1 + QPochhammer[-q, -q]/QPochhammer[q, -q])^3 (1 + QPochhammer[-q^2, -q^2]/QPochhammer[q^2, -q^2])/16, {q, 0, nmax}], q]

A374014 Expansion of (Sum_{k>=0} x^(k^4))^16.

Original entry on oeis.org

1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 17, 240, 1680, 7280, 21840, 48048, 80080, 102960, 102960, 80080, 48048, 21840, 7280, 1680, 240, 16, 120, 1680, 10920, 43680, 120120, 240240, 360360, 411840, 360360, 240240, 120120, 43680, 10920, 1680, 120, 0
Offset: 0

Views

Author

Seiichi Manyama, Jun 25 2024

Keywords

Comments

Number of ways to write n as an ordered sum of 16 fourth powers (A000583).

Crossrefs

Programs

  • PARI
    my(N=50, x='x+O('x^N)); Vec(sum(k=0, sqrtnint(N, 4), x^k^4)^16)

Formula

a(A099591(n)) = 0.
a(n) > 0 for n > 13792.

A317646 Expansion of (1 + theta_3(q))^2*(1 + theta_3(q^2))^2/16, where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 2, 3, 4, 5, 4, 5, 4, 5, 8, 8, 8, 11, 8, 6, 8, 5, 10, 14, 12, 16, 12, 11, 8, 11, 14, 14, 20, 18, 12, 14, 12, 5, 20, 19, 20, 30, 16, 17, 16, 16, 18, 24, 20, 25, 28, 14, 16, 11, 22, 25, 28, 34, 20, 30, 24, 18, 28, 26, 28, 42, 24, 20, 32, 5, 28, 36, 28, 41, 32, 32, 20, 30, 30, 28, 44
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 02 2018

Keywords

Comments

Number of nonnegative integer solutions to the equation x^2 + y^2 + 2*z^2 + 2*w^2 = n.

Examples

			G.f. = 1 + 2*q + 3*q^2 + 4*q^3 + 5*q^4 + 4*q^5 + 5*q^6 + 4*q^7 + 5*q^8 + ...
		

Crossrefs

Programs

  • Mathematica
    nmax = 75; CoefficientList[Series[(1 + EllipticTheta[3, 0, q])^2 (1 + EllipticTheta[3, 0, q^2])^2/16, {q, 0, nmax}], q]
    nmax = 75; CoefficientList[Series[(1 + QPochhammer[-q, -q]/QPochhammer[q, -q])^2 (1 + QPochhammer[-q^2, -q^2]/QPochhammer[q^2, -q^2])^2/16, {q, 0, nmax}], q]
Showing 1-10 of 10 results.