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.

Previous Showing 11-12 of 12 results.

A045853 Number of nonnegative solutions of x1^2 + x2^2 + ... + x12^2 = n.

Original entry on oeis.org

1, 12, 66, 220, 507, 924, 1584, 2772, 4521, 6436, 8712, 12552, 18041, 23364, 28776, 37896, 50997, 62832, 72996, 89892, 115776, 139348, 156816, 185064, 231759, 274044, 300828, 343564, 418638, 487080, 528528, 592284, 707421, 814836, 874170, 959508, 1128338
Offset: 0

Views

Author

Keywords

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:= b(n, 12):
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    CoefficientList[((1 + EllipticTheta[3, 0, q])/2)^12 + O[q]^40, q] (* Jean-François Alcover, Mar 01 2021 *)
  • 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(12, 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 + ...)^12.
G.f.: ((1 + theta_3(x)) / 2)^12. - Ilya Gutkovskiy, Feb 10 2021

A045854 Number of nonnegative solutions of x1^2 + x2^2 + ... + x24^2 = n.

Original entry on oeis.org

1, 24, 276, 2024, 10650, 43056, 140668, 388608, 948267, 2121176, 4448292, 8811024, 16535160, 29632464, 51256788, 86069680, 140300001, 222302544, 344353516, 523941288, 782700672, 1146771168, 1653111384, 2354351232, 3312339849, 4594531176, 6293753580, 8546252072
Offset: 0

Views

Author

Keywords

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:= b(n, 24):
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    CoefficientList[((1 + EllipticTheta[3, 0, q])/2)^24 + O[q]^40, q] (* Jean-François Alcover, Mar 01 2021 *)
  • 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(24, 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 + ...)^24.
G.f.: ((1 + theta_3(x)) / 2)^24. - Ilya Gutkovskiy, Feb 10 2021
Previous Showing 11-12 of 12 results.