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.

A243148 Triangle read by rows: T(n,k) = number of partitions of n into k nonzero squares; n >= 0, 0 <= k <= n.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, May 30 2014

Keywords

Examples

			T(20,5) = 2 = #{ (16,1,1,1,1), (4,4,4,4,4) } since 20 = 4^2 + 4 * 1^2 = 5 * 2^2.
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;
  (...)
		

Crossrefs

Columns k = 0..10 give: A000007, A010052 (for n>0), A025426, A025427, A025428, A025429, A025430, A025431, A025432, A025433, A025434.
Row sums give A001156.
T(2n,n) gives A111178.
T(n^2,n) gives A319435.
T(n,k) = 1 for n in A025284, A025321, A025357, A294675, A295670, A295797 (for k = 2..7, respectively).

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
          `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(i^2>n, 0, b(n-i^2, i, t-1))))
        end:
    T:= (n, k)-> b(n, isqrt(n), k):
    seq(seq(T(n, k), k=0..n), n=0..14);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+(s-> `if`(s>n, 0, expand(x*b(n-s, i))))(i^2)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, isqrt(n))):
    seq(T(n), n=0..14);  # Alois P. Heinz, Oct 30 2021
  • 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 *)
  • PARI
    T(n,k,L=n)=if(n>k*L^2, 0, k>n-3, k==n, k<2, issquare(n,&n) && n<=L*k, k>n-6, n-k==3, L=min(L,sqrtint(n-k+1)); sum(r=0,min(n\L^2,k-1),T(n-r*L^2,k-r,L-1), n==k*L^2)) \\ M. F. Hasler, Aug 03 2020

Formula

T(n,k) = [x^n y^k] 1/Product_{j>=1} (1-y*x^A000290(j)).
Sum_{k=1..n} k * T(n,k) = A281541(n).
Sum_{k=1..n} n * T(n,k) = A276559(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A292520(n).

A340915 Number of ways to write n as an ordered sum of 8 squares of positive integers.

Original entry on oeis.org

1, 0, 0, 8, 0, 0, 28, 0, 8, 56, 0, 56, 70, 0, 168, 64, 28, 280, 84, 168, 280, 176, 420, 224, 345, 560, 392, 616, 420, 848, 924, 336, 1246, 1064, 868, 1464, 988, 1680, 1820, 1120, 1904, 2464, 1932, 1904, 2870, 2752, 2772, 2912, 2892, 4256, 3640, 3248, 4480, 5040, 4760, 3696, 6120
Offset: 8

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add((s->
          `if`(s>n, 0, b(n-s, t-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n, 8):
    seq(a(n), n=8..64);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 64; CoefficientList[Series[(EllipticTheta[3, 0, x] - 1)^8/256, {x, 0, nmax}], x] // Drop[#, 8] &

Formula

G.f.: (theta_3(x) - 1)^8 / 256, where theta_3() is the Jacobi theta function.

A340999 Number of partitions of n into 8 distinct nonzero squares.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 3, 0, 0, 1
Offset: 204

Views

Author

Ilya Gutkovskiy, Feb 02 2021

Keywords

Crossrefs

A287167 Smallest number with exactly n representations as a sum of 8 nonzero squares or 0 if no such number exists.

Original entry on oeis.org

8, 23, 35, 32, 46, 58, 72, 56, 62, 70, 71, 79, 80, 83, 88, 89, 91, 86, 103, 94, 109, 104, 107, 112, 113, 110, 122, 119, 126, 121, 118, 144, 0, 128, 131, 136, 137, 153, 143, 139, 149, 134, 0, 0, 142, 152, 164, 154
Offset: 1

Views

Author

Ilya Gutkovskiy, May 20 2017

Keywords

Examples

			a(1) = 8 because 8 is the smallest number with exactly 1 representation as a sum of 8 nonzero squares: 8 = 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2;
a(2) = 23 because 23 is the smallest number with exactly 2 representations as a sum of 8 nonzero squares: 23 = 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 4^2 = 1^2 + 1^2 + 1^2 + 2^2 + 2^2 + 2^2 + 2^2 + 2^2, etc.
		

Crossrefs

Formula

A025432(a(n)) = n for a(n) > 0.

A295930 Largest number with exactly n representations as a sum of eight nonnegative squares.

Original entry on oeis.org

3, 7, 15, 14, 19, 24, 27, 28, 33, 35, 39
Offset: 1

Views

Author

Robert Price, Nov 29 2017

Keywords

Comments

It appears that a(12) does not exist.

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, New York, 1985, p. 86, Theorem 1.

Crossrefs

Showing 1-5 of 5 results.