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

A255212 Number A(n,k) of partitions of n^2 into at most k square parts; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 1, 2, 2, 1, 2, 1, 0, 1, 1, 2, 2, 2, 2, 1, 1, 0, 1, 1, 2, 3, 3, 3, 2, 1, 1, 0, 1, 1, 2, 3, 3, 4, 4, 2, 1, 1, 0, 1, 1, 2, 3, 4, 5, 5, 4, 1, 1, 1, 0, 1, 1, 2, 4, 5, 7, 9, 6, 2, 4, 2, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Feb 17 2015

Keywords

Examples

			Square array A(n,k) begins:
  1, 1, 1, 1, 1,  1,  1,  1,  1,  1,  1, ...
  0, 1, 1, 1, 1,  1,  1,  1,  1,  1,  1, ...
  0, 1, 1, 1, 2,  2,  2,  2,  2,  2,  2, ...
  0, 1, 1, 2, 2,  2,  3,  3,  3,  4,  4, ...
  0, 1, 1, 1, 2,  3,  3,  4,  5,  5,  6, ...
  0, 1, 2, 2, 3,  4,  5,  7,  8,  9, 11, ...
  0, 1, 1, 2, 4,  5,  9, 10, 11, 15, 17, ...
  0, 1, 1, 2, 4,  6,  9, 13, 18, 21, 27, ...
  0, 1, 1, 1, 2,  7,  9, 16, 25, 30, 41, ...
  0, 1, 1, 4, 6,  8, 18, 27, 36, 52, 68, ...
  0, 1, 2, 2, 7, 13, 23, 36, 51, 70, 94, ...
		

Crossrefs

Main diagonal gives A105152.
Cf. A302996.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0 or i=1 and n<=t, 1,
          (j-> `if`(t*jn, 0, b(n-j, i, t-1))))(i^2))
        end:
    A:= (n, k)-> b(n^2, n, k):
    seq(seq(A(n, d-n), n=0..d), d=0..15);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0 || i == 1 && n <= t, 1, Function[j, If[t*jn, 0, b[n-j, i, t-1]]]][i^2]]; A[n_, k_] := b[n^2, n, k]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 15}] // Flatten (* Jean-François Alcover, Feb 22 2016, after Alois P. Heinz *)

A065458 Number of inequivalent (ordered) solutions to a^2 + b^2 + c^2 + d^2 = n^2.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 4, 4, 2, 6, 7, 6, 4, 8, 10, 14, 2, 11, 14, 13, 7, 23, 15, 17, 4, 24, 21, 31, 10, 25, 37, 28, 2, 46, 29, 49, 14, 38, 35, 61, 7, 45, 62, 49, 15, 93, 47, 57, 4, 72, 67, 97, 21, 71, 84, 101, 10, 119, 70, 86, 37, 92, 79, 165, 2, 138, 127, 109, 29, 168, 140, 121, 14
Offset: 0

Views

Author

Wouter Meeussen, Nov 18 2001

Keywords

Examples

			a(5)=3 because 25 produces {0,0,0,5}, {0,0,3,4}, {1,2,2,4}.
		

Crossrefs

Column k=4 of A255212.

Programs

  • Maple
    N:= 100:
    R:= Vector(N,1):
    for a from 0 to N do
      for b from a to floor(sqrt(N^2-a^2)) do
         for c from b to floor(sqrt(N^2-a^2-b^2)) do
           q:= a^2 + b^2 + c^2;
           for f in numtheory:-divisors(q) do
              if f^2 + 2*f*c <= q and (f + q/f)::even then
                 r:= (f + q/f)/2;
                 if r <= N then R[r]:= R[r]+1 fi;
              fi
    od od od od:
    convert(R,list); # Robert Israel, Feb 16 2015
  • Mathematica
    Length/@Table[SumOfSquaresRepresentations[4, (k)^2], {k, 72}]

Extensions

a(0)=1 prepended by Alois P. Heinz, Feb 17 2015

A179015 Number of ways in which n^2 can be expressed as the sum of exactly five positive squares.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 5, 2, 6, 6, 9, 9, 15, 8, 25, 20, 21, 25, 39, 26, 46, 44, 57, 49, 71, 52, 102, 81, 81, 99, 145, 92, 156, 126, 164, 160, 204, 151, 247, 217, 236, 245, 326, 211, 357, 319, 381, 360, 416, 344, 518, 446, 476, 450, 670, 468, 675, 607, 661, 668, 825, 625
Offset: 1

Views

Author

Carmine Suriano, Jun 24 2010

Keywords

Comments

As n goes to infinity the ratio of a(n)/a(n) of sequence A178898 (using all different squares) tends to 5/4.

Crossrefs

Cf. A000132. - R. J. Mathar, Jun 26 2010

Programs

  • Maple
    a(8) = 5 since 64 can be expressed in five different ways as the sum of 5 squares (order is ignored): 8^2 = 7^2+3^2+2^2+1^2+1^2 = 6^2+5^2+1^2+1^2+1^2 = 6^2+4^2+2^2+2^2+2^2 = 6^2+3^2+3^2+3^2+1^2 = 5^2+5^2+3^2+1^2+1^2.

Formula

Asymptotic behavior for large values of n is a(n) = n^2/2-47n/2+243.
a(n) = A025429(n^2). - R. J. Mathar, Jun 26 2010
a(n) = A065459(n) - A065458(n). - Alois P. Heinz, Oct 25 2018
Showing 1-3 of 3 results.