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.

A066535 Number of ways of writing n as a sum of n squares.

Original entry on oeis.org

1, 2, 4, 8, 24, 112, 544, 2368, 9328, 34802, 129064, 491768, 1938336, 7801744, 31553344, 127083328, 509145568, 2035437440, 8148505828, 32728127192, 131880275664, 532597541344, 2153312518240, 8710505815360, 35250721087168, 142743029326162, 578472382307304
Offset: 0

Views

Author

Peter Bertok (peter(AT)bertok.com), Jan 07 2002

Keywords

Examples

			There are a(3) = 8 solutions (x,y,z) of 3 = x^2 + y^2 + z^2: (1,1,1), (-1,-1,-1), 3 permutations of (1,1,-1) and 3 permutations of (1,-1,-1).
		

Crossrefs

Cf. A122141, A166952. - Paul D. Hanna, Oct 25 2009
a(n^2) gives A361431.

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1, `if`(n<0 or t<1, 0,
          b(n, t-1) +2*add(b(n-j^2, t-1), j=1..isqrt(n))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jul 16 2014
  • Mathematica
    Join[{1}, Table[SquaresR[n, n], {n, 24}]]
  • PARI
    {a(n)=local(THETA3=1+2*sum(k=1,sqrtint(n),x^(k^2))+x*O(x^n)); polcoeff(THETA3^n, n)} /* Paul D. Hanna, Oct 25 2009 */

Formula

a(n) equals the coefficient of x^n in the n-th power of Jacobi theta_3(x) where theta_3(x) = 1 + 2*Sum_{n>=1} x^(n^2). - Paul D. Hanna, Oct 25 2009
a(n) ~ c * d^n / sqrt(n), where d = 4.13273137623493996302796465... (= 1/radius of convergence A166952), c = 0.2820942036723951157919967... . - Vaclav Kotesovec, Sep 12 2014

Extensions

Edited by Dean Hickerson, Jan 12 2002
a(0) added by Paul D. Hanna, Oct 25 2009
Edited by R. J. Mathar, Oct 29 2009

A166952 G.f. satisfies: A(x) = theta_3(x*A(x)) where Jacobi theta_3(x) = 1 + 2*Sum_{n>=1} x^(n^2).

Original entry on oeis.org

1, 2, 4, 8, 18, 52, 184, 688, 2512, 8866, 30824, 108088, 387952, 1426804, 5335152, 20105808, 75979458, 287627524, 1092023532, 4163964648, 15955084784, 61412039424, 237256107576, 919294150288, 3570699037984, 13900290723814
Offset: 0

Views

Author

Paul D. Hanna, Oct 26 2009

Keywords

Comments

From Paul D. Hanna, Apr 24 2010: (Start)
SPECIAL VALUES:
. at x = exp(-Pi)*Pi^(-1/4)*gamma(3/4) = 0.039775896186087627425...,
. A(x) = theta_3(exp(-Pi)) = Pi^(1/4)/gamma(3/4) = 1.0864348112133080...
RADIUS OF CONVERGENCE r:
. at r = 0.241970723224463308846762732757915397312...,
. A(r) = 2.506628552782237708927560606516272396709...
where r and A(r) are given by:
. r = z/theta_3(z) and
. A(r) = theta_3(z)
such that z is the real root nearest the origin that satisfies:
. theta_3(z) - z*theta_3'(z) = 0, which has solution:
. z = 0.6065307237718078589943387177361885081872...
(End)

Examples

			G.f.: A(x) = 1 + 2*x + 4*x^2 + 8*x^3 + 18*x^4 + 52*x^5 + 184*x^6 +...
A(x/theta_3(x)) = 1 + 2*x + 2*x^4 + 2*x^9 + 2*x^16 + 2*x^25 +...
log(A(x)) = 2*x + 4*x^2/2 + 8*x^3/3 + 24*x^4/4 + 112*x^5/5 +...+ A066535(n)*x^n/n +...
		

Crossrefs

Cf. A000122 (theta_3), A066535, A066536.

Programs

  • Mathematica
    CoefficientList[1/x*InverseSeries[Series[x/EllipticTheta[3, 0, x], {x, 0, 25}], x], x] (* Vaclav Kotesovec, Nov 16 2023 *)
    (* Calculation of constants {d,c}: *) {1/r, Sqrt[s/(2*Pi*r^2*Derivative[0, 0, 2][EllipticTheta][3, 0, r*s])]} /. FindRoot[{s == EllipticTheta[3, 0, r*s], r*Derivative[0, 0, 1][EllipticTheta][3, 0, r*s] == 1}, {r, 1/4}, {s, 5/2}, WorkingPrecision -> 70] (* Vaclav Kotesovec, Nov 16 2023 *)
  • PARI
    a(n)=local(THETA3=1+2*sum(k=1,sqrtint(n),x^(k^2))+x*O(x^n));polcoeff(THETA3^(n+1),n)/(n+1)
    
  • PARI
    a(n)=local(A=1+x); for(i=1, n, A=prod(k=1,n,(1-(-x)^k*A^k+x*O(x^n))/(1+(-x)^k*A^k+x*O(x^n)) )); polcoeff(A, n)
    for(n=0,30,print1(a(n),", "))
    
  • PARI
    a(n)=local(A=1+x); for(i=1, n, A=prod(k=1,n,(1+(x*A)^(2*k-1)+x*O(x^n))^2*(1-(x*A)^(2*k)+x*O(x^n)) )); polcoeff(A, n)
    for(n=0,30,print1(a(n),", ")) \\ Paul D. Hanna, Jul 12 2013

Formula

G.f.: A(x) = (1/x)*Series_Reversion(x/theta_3(x)).
G.f. satisfies: A(x/theta_3(x)) = theta_3(x) = 1 + 2*Sum_{n>=1} x^(n^2).
G.f. satisfies: A(x) = Product_{n>=1} (1 - (-x)^n*A(x)^n) / (1 + (-x)^n*A(x)^n).
G.f. satisfies: A(x) = Product_{n>=1} (1 + (x*A(x))^(2*n-1))^2 * (1 - (x*A(x))^(2*n)).
G.f. satisfies: [x^n] A(x)^(1-n) = 2-2n if n>0 is square, zero otherwise.
a(n) = A066536(n)/(n+1) where A066536(n) equals the number of ways of writing n as the sum of n+1 squares.
Logarithmic derivative yields A066535, number of ways of writing n as the sum of n squares, for n>=1.
a(n) ~ c * d^n / n^(3/2), where d = 4.13273137623493996302796465513832835490078625705045019249993320055571... and c = 0.70710538549959357505200420443014251744770906948354300807129911827348... - Vaclav Kotesovec, Nov 16 2023

A302860 a(n) = [x^n] theta_3(x)^n/(1 - x), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 3, 9, 27, 89, 333, 1341, 5449, 21697, 84663, 327829, 1275739, 5020457, 19964623, 79883141, 320317827, 1284656385, 5152761033, 20686311261, 83182322509, 335110196569, 1352277390001, 5463873556381, 22097867887045, 89441286136465, 362277846495883, 1468465431530457
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 14 2018

Keywords

Comments

a(n) = number of integer lattice points inside the n-dimensional hypersphere of radius sqrt(n).

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[EllipticTheta[3, 0, x]^n/(1 - x), {x, 0, n}], {n, 0, 26}]
    Table[SeriesCoefficient[1/(1 - x) Sum[x^k^2, {k, -n, n}]^n, {x, 0, n}], {n, 0, 26}]

Formula

a(n) = A122510(n,n).
a(n) ~ c / (sqrt(n) * r^n), where r = 0.241970723224463308846762732757915397312... (= radius of convergence A166952) and c = 0.716940866073606328... - Vaclav Kotesovec, Apr 14 2018
Showing 1-3 of 3 results.