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 18 results. Next

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

A340905 Number of ways to write n as an ordered sum of 6 squares of positive integers.

Original entry on oeis.org

1, 0, 0, 6, 0, 0, 15, 0, 6, 20, 0, 30, 15, 0, 60, 12, 15, 60, 31, 60, 30, 60, 90, 36, 86, 60, 120, 120, 15, 180, 141, 60, 165, 140, 180, 186, 120, 180, 285, 156, 126, 360, 255, 216, 270, 260, 390, 240, 262, 420, 426, 360, 210, 540, 530, 216, 540, 540, 480, 600, 300, 600, 825, 312, 576, 840
Offset: 6

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, 6):
    seq(a(n), n=6..71);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 71; CoefficientList[Series[(EllipticTheta[3, 0, x] - 1)^6/64, {x, 0, nmax}], x] // Drop[#, 6] &

Formula

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

A340988 Number of partitions of n into 6 distinct nonzero squares.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 3, 2, 0, 1, 2, 1, 1, 1, 0, 3, 0, 0, 4, 1, 0, 1
Offset: 91

Views

Author

Ilya Gutkovskiy, Feb 02 2021

Keywords

Crossrefs

A345477 Numbers that are the sum of six squares in ten or more ways.

Original entry on oeis.org

81, 84, 86, 89, 92, 93, 95, 100, 101, 102, 104, 105, 107, 108, 110, 111, 113, 114, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150
Offset: 1

Views

Author

David Consiglio, Jr., Jun 20 2021

Keywords

Examples

			84 = 1^2 + 1^2 + 1^2 + 1^2 + 4^2 + 8^2
   = 1^2 + 1^2 + 1^2 + 3^2 + 6^2 + 6^2
   = 1^2 + 1^2 + 1^2 + 4^2 + 4^2 + 7^2
   = 1^2 + 1^2 + 2^2 + 2^2 + 5^2 + 7^2
   = 1^2 + 1^2 + 4^2 + 4^2 + 5^2 + 5^2
   = 1^2 + 2^2 + 2^2 + 5^2 + 5^2 + 5^2
   = 1^2 + 2^2 + 3^2 + 3^2 + 5^2 + 6^2
   = 2^2 + 2^2 + 2^2 + 2^2 + 2^2 + 8^2
   = 2^2 + 2^2 + 3^2 + 3^2 + 3^2 + 7^2
   = 2^2 + 4^2 + 4^2 + 4^2 + 4^2 + 4^2
   = 3^2 + 3^2 + 3^2 + 4^2 + 4^2 + 5^2
so 84 is a term.
		

Crossrefs

Programs

  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**2 for x in range(1, 1000)]
    for pos in cwr(power_terms, 6):
        tot = sum(pos)
        keep[tot] += 1
        rets = sorted([k for k, v in keep.items() if v >= 10])
        for x in range(len(rets)):
            print(rets[x])

Formula

Conjectures from Chai Wah Wu, Jan 05 2024: (Start)
a(n) = 2*a(n-1) - a(n-2) for n > 20.
G.f.: x*(-x^19 + x^18 - x^17 + x^16 - x^15 + x^14 - x^13 + x^12 - x^11 + x^10 - 4*x^8 + 3*x^7 + x^6 - 2*x^5 + x^3 - x^2 - 78*x + 81)/(x - 1)^2. (End)

A295669 Largest number with exactly n representations as a sum of six nonnegative squares.

Original entry on oeis.org

7, 15, 23, 31, 32, 40, 48, 55, 64, 58, 63, 71, 79, 96, 88, 78, 85, 97, 112, 93, 106, 111, 120, 121, 128, 136, 130, 122, 160, 145, 139, 141, 151, 168, 159, 157, 169, 192, 156, 184, 178
Offset: 1

Views

Author

Robert Price, Nov 25 2017

Keywords

Comments

It appears that a(42) does not exist.

References

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

Crossrefs

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

Original entry on oeis.org

6, 21, 30, 36, 63, 54, 60, 87, 78, 81, 84, 111, 102, 117, 108, 116, 126, 129, 134, 137, 132, 150, 172, 165, 161, 156, 177, 164, 195, 191, 182, 213, 180, 188, 198, 0, 204, 206, 215, 222, 243, 212, 251, 262, 233, 230
Offset: 1

Views

Author

Ilya Gutkovskiy, May 20 2017

Keywords

Examples

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

Crossrefs

Formula

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

A295670 Numbers that have exactly one representation as a sum of six positive squares.

Original entry on oeis.org

6, 9, 12, 14, 15, 17, 18, 20, 22, 23, 25, 26, 27, 28, 31, 32, 34, 35, 37, 40, 43
Offset: 1

Views

Author

Robert Price, Nov 25 2017

Keywords

Comments

It appears that this sequence is finite and complete. See the von Eitzen link for a proof for the 5 positive squares case.

References

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

Crossrefs

Programs

  • Mathematica
    m = 6;
    r[n_] := Reduce[xx = Array[x, m]; 0 <= x[1] && LessEqual @@ xx && AllTrue[xx, Positive] && n == Total[xx^2], xx, Integers];
    For[n = 0, n < 50, n++, rn = r[n]; If[rn[[0]] === And, Print[n, " ", rn]]] (* Jean-François Alcover, Feb 25 2019 *)
    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];
    Position[Table[T[n, 6], {n, 0, 100}], 1] - 1 // Flatten (* Jean-François Alcover, Nov 06 2020, after Alois P. Heinz in A243148 *)

Formula

A243148(a(n),6) = 1. - Alois P. Heinz, Feb 25 2019

A295702 Largest number with exactly n representations as a sum of six positive squares.

Original entry on oeis.org

43, 64, 67, 82, 91, 106, 112, 109, 115, 133, 139, 154, 131, 160, 146, 178, 163, 181, 166, 169, 202, 187, 172, 226, 208, 211, 229, 196, 217, 232, 203, 256, 223, 274, 253
Offset: 1

Views

Author

Robert Price, Nov 25 2017

Keywords

Comments

It appears that a(36) does not exist.

References

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

Crossrefs

A295692 Numbers that have exactly two representations as a sum of six positive squares.

Original entry on oeis.org

21, 24, 29, 42, 58, 64
Offset: 1

Views

Author

Robert Price, Nov 25 2017

Keywords

Comments

It appears that this sequence is finite and complete. See the von Eitzen link for a proof for the 5 positive squares case.

References

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

Crossrefs

A295693 Numbers that have exactly three representations as a sum of six positive squares.

Original entry on oeis.org

30, 33, 38, 39, 46, 47, 48, 49, 50, 51, 52, 55, 59, 61, 67
Offset: 1

Views

Author

Robert Price, Nov 25 2017

Keywords

Comments

It appears that this sequence is finite and complete. See the von Eitzen link for a proof for the 5 positive squares case.

References

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

Crossrefs

Showing 1-10 of 18 results. Next