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.
%I A045850 #26 Aug 26 2019 11:46:43 %S A045850 1,8,28,56,78,112,196,288,309,344,532,736,756,784,1092,1456,1486,1400, %T A045850 1792,2464,2562,2352,2940,3872,3864,3536,4256,5432,5608,5216,6076, %U A045850 7840,7933,6832,7952,10472,10494 %N A045850 Number of nonnegative solutions of x1^2 + x2^2 + ... + x8^2 = n. %H A045850 Seiichi Manyama, <a href="/A045850/b045850.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..2000 from T. D. Noe) %H A045850 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a> %F A045850 Coefficient of q^n in (1 + q + q^4 + q^9 + q^16 + q^25 + q^36 + q^49 + q^64 + ...)^8. %F A045850 G.f.: (1 + theta_3(q))^8/256, where theta_3() is the Jacobi theta function. - _Ilya Gutkovskiy_, Aug 08 2018 %t A045850 (1 + EllipticTheta[3, 0, q])^8/256 + O[q]^40 // CoefficientList[#, q]& (* _Jean-François Alcover_, Aug 26 2019 *) %o A045850 (PARI) seq(n)=Vec((sum(k=0, sqrtint(n), x^(k^2)) + O(x*x^n))^8) \\ _Andrew Howroyd_, Aug 08 2018 %o A045850 (Ruby) %o A045850 def mul(f_ary, b_ary, m) %o A045850 s1, s2 = f_ary.size, b_ary.size %o A045850 ary = Array.new(s1 + s2 - 1, 0) %o A045850 (0..s1 - 1).each{|i| %o A045850 (0..s2 - 1).each{|j| %o A045850 ary[i + j] += f_ary[i] * b_ary[j] %o A045850 } %o A045850 } %o A045850 ary[0..m] %o A045850 end %o A045850 def power(ary, n, m) %o A045850 if n == 0 %o A045850 a = Array.new(m + 1, 0) %o A045850 a[0] = 1 %o A045850 return a %o A045850 end %o A045850 k = power(ary, n >> 1, m) %o A045850 k = mul(k, k, m) %o A045850 return k if n & 1 == 0 %o A045850 return mul(k, ary, m) %o A045850 end %o A045850 def A(k, n) %o A045850 ary = Array.new(n + 1, 0) %o A045850 (0..Math.sqrt(n).to_i).each{|i| ary[i * i] = 1} %o A045850 power(ary, k, n) %o A045850 end %o A045850 p A(8, 100) # _Seiichi Manyama_, May 28 2017 %Y A045850 Cf. A010052, A045847. %K A045850 nonn %O A045850 0,2 %A A045850 _N. J. A. Sloane_