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.

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

A340481 Number of ways to write n as an ordered sum of 5 squares of positive integers.

Original entry on oeis.org

1, 0, 0, 5, 0, 0, 10, 0, 5, 10, 0, 20, 5, 0, 30, 6, 10, 20, 20, 30, 5, 30, 30, 20, 35, 10, 60, 45, 0, 60, 50, 30, 45, 50, 60, 70, 35, 30, 110, 50, 31, 110, 80, 80, 50, 70, 120, 70, 75, 90, 140, 110, 20, 140, 160, 60, 135, 120, 120, 180, 40, 130, 230, 80, 120, 170, 200, 155, 85, 200, 190
Offset: 5

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

Formula

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

A045849 Number of nonnegative solutions of x1^2 + x2^2 + ... + x7^2 = n.

Original entry on oeis.org

1, 7, 21, 35, 42, 63, 112, 141, 126, 154, 259, 315, 280, 308, 462, 567, 497, 462, 693, 910, 798, 749, 1078, 1281, 1092, 1043, 1407, 1715, 1576, 1449, 1946, 2422, 2016, 1687, 2429, 3045, 2604, 2345, 3066
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    (1 + EllipticTheta[3, 0, q])^7/128 + O[q]^50 // CoefficientList[#, q]& (* Jean-François Alcover, Aug 26 2019 *)
  • PARI
    seq(n)=Vec((sum(k=0, sqrtint(n), x^(k^2)) + O(x*x^n))^7) \\ Andrew Howroyd, Aug 08 2018
    
  • Ruby
    def mul(f_ary, b_ary, m)
      s1, s2 = f_ary.size, b_ary.size
      ary = Array.new(s1 + s2 - 1, 0)
      (0..s1 - 1).each{|i|
        (0..s2 - 1).each{|j|
          ary[i + j] += f_ary[i] * b_ary[j]
        }
      }
      ary[0..m]
    end
    def power(ary, n, m)
      if n == 0
        a = Array.new(m + 1, 0)
        a[0] = 1
        return a
      end
      k = power(ary, n >> 1, m)
      k = mul(k, k, m)
      return k if n & 1 == 0
      return mul(k, ary, m)
    end
    def A(k, n)
      ary = Array.new(n + 1, 0)
      (0..Math.sqrt(n).to_i).each{|i| ary[i * i] = 1}
      power(ary, k, n)
    end
    p A(7, 100) # Seiichi Manyama, May 28 2017

Formula

Coefficient of q^n in (1 + q + q^4 + q^9 + q^16 + q^25 + q^36 + q^49 + q^64 + ...)^7.
G.f.: (1 + theta_3(q))^7/128, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 08 2018

A341400 Number of nonnegative solutions to (x_1)^2 + (x_2)^2 + ... + (x_5)^2 <= n.

Original entry on oeis.org

1, 6, 16, 26, 36, 57, 87, 107, 122, 157, 207, 247, 277, 322, 392, 452, 482, 537, 637, 717, 773, 863, 973, 1053, 1113, 1203, 1343, 1473, 1553, 1668, 1858, 1998, 2053, 2173, 2373, 2543, 2673, 2818, 3018, 3218, 3338, 3483, 3753, 3973, 4113, 4344, 4634, 4834, 4944, 5139, 5449
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A038671.

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          b(n, k-1)+add(b(n-j^2, k-1), j=1..isqrt(n))))
        end:
    a:= proc(n) option remember; b(n, 5)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 50; CoefficientList[Series[(1 + EllipticTheta[3, 0, x])^5/(32 (1 - x)), {x, 0, nmax}], x]

Formula

G.f.: (1 + theta_3(x))^5 / (32 * (1 - x)).
a(n^2) = A055404(n).

A280718 Expansion of (Sum_{k>=0} x^(k*(3*k-1)/2))^5.

Original entry on oeis.org

1, 5, 10, 10, 5, 6, 20, 30, 20, 5, 10, 30, 35, 30, 30, 30, 25, 30, 60, 60, 25, 5, 35, 80, 70, 51, 35, 50, 80, 90, 80, 30, 35, 60, 80, 95, 90, 90, 50, 75, 140, 140, 85, 20, 70, 120, 130, 120, 95, 115, 100, 115, 140, 155, 110, 40, 80, 200, 230, 140, 81, 120, 200, 190, 180, 120, 80, 100, 160, 240, 200, 155, 120, 140, 245, 260, 230
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2017

Keywords

Comments

Number of ways to write n as an ordered sum of 5 pentagonal numbers (A000326).
a(n) > 0 for all n >= 0.
Every number is the sum of at most 5 pentagonal numbers.
Every number is the sum of at most k k-gonal numbers (Fermat's polygonal number theorem).

Examples

			a(5) = 6 because we have:
[5, 0, 0, 0, 0]
[0, 5, 0, 0, 0]
[0, 0, 5, 0, 0]
[0, 0, 0, 5, 0]
[0, 0, 0, 0, 5]
[1, 1, 1, 1, 1]
		

Crossrefs

Programs

  • Mathematica
    nmax = 76; CoefficientList[Series[Sum[x^(k (3 k - 1)/2), {k, 0, nmax}]^5, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k>=0} x^(k*(3*k-1)/2))^5.
Showing 1-5 of 5 results.