login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A045850 Number of nonnegative solutions of x1^2 + x2^2 + ... + x8^2 = n. 5
1, 8, 28, 56, 78, 112, 196, 288, 309, 344, 532, 736, 756, 784, 1092, 1456, 1486, 1400, 1792, 2464, 2562, 2352, 2940, 3872, 3864, 3536, 4256, 5432, 5608, 5216, 6076, 7840, 7933, 6832, 7952, 10472, 10494 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..2000 from T. D. Noe)
FORMULA
Coefficient of q^n in (1 + q + q^4 + q^9 + q^16 + q^25 + q^36 + q^49 + q^64 + ...)^8.
G.f.: (1 + theta_3(q))^8/256, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 08 2018
MATHEMATICA
(1 + EllipticTheta[3, 0, q])^8/256 + O[q]^40 // CoefficientList[#, q]& (* Jean-François Alcover, Aug 26 2019 *)
PROG
(PARI) seq(n)=Vec((sum(k=0, sqrtint(n), x^(k^2)) + O(x*x^n))^8) \\ 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(8, 100) # Seiichi Manyama, May 28 2017
CROSSREFS
Sequence in context: A230211 A229393 A173681 * A264354 A033580 A299289
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 27 08:35 EDT 2024. Contains 375462 sequences. (Running on oeis4.)