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 A045851 #29 Aug 26 2019 12:40:58 %S A045851 1,9,36,84,135,198,336,540,675,766,1080,1584,1857,1962,2520,3480,3987, %T A045851 3987,4656,6300,7326,7182,8064,10656,12063,11583,12672,16116,18180, %U A045851 17784,19104,23940,27027,25554 %N A045851 Number of nonnegative solutions of x1^2 + x2^2 + ... + x9^2 = n. %H A045851 Seiichi Manyama, <a href="/A045851/b045851.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..2000 from T. D. Noe) %H A045851 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a> %F A045851 Coefficient of q^n in (1 + q + q^4 + q^9 + q^16 + q^25 + q^36 + q^49 + q^64 + ...)^9. %F A045851 G.f.: (1 + theta_3(q))^9/512, where theta_3() is the Jacobi theta function. - _Ilya Gutkovskiy_, Aug 08 2018 %t A045851 (1 + EllipticTheta[3, 0, q])^9/512 + O[q]^40 // CoefficientList[#, q]& (* _Jean-François Alcover_, Aug 26 2019 *) %o A045851 (PARI) seq(n)=Vec((sum(k=0, sqrtint(n), x^(k^2)) + O(x*x^n))^9) \\ _Andrew Howroyd_, Aug 08 2018 %o A045851 (Ruby) %o A045851 def mul(f_ary, b_ary, m) %o A045851 s1, s2 = f_ary.size, b_ary.size %o A045851 ary = Array.new(s1 + s2 - 1, 0) %o A045851 (0..s1 - 1).each{|i| %o A045851 (0..s2 - 1).each{|j| %o A045851 ary[i + j] += f_ary[i] * b_ary[j] %o A045851 } %o A045851 } %o A045851 ary[0..m] %o A045851 end %o A045851 def power(ary, n, m) %o A045851 if n == 0 %o A045851 a = Array.new(m + 1, 0) %o A045851 a[0] = 1 %o A045851 return a %o A045851 end %o A045851 k = power(ary, n >> 1, m) %o A045851 k = mul(k, k, m) %o A045851 return k if n & 1 == 0 %o A045851 return mul(k, ary, m) %o A045851 end %o A045851 def A(k, n) %o A045851 ary = Array.new(n + 1, 0) %o A045851 (0..Math.sqrt(n).to_i).each{|i| ary[i * i] = 1} %o A045851 power(ary, k, n) %o A045851 end %o A045851 p A(9, 100) # _Seiichi Manyama_, May 28 2017 %Y A045851 Cf. A010052, A045847. %K A045851 nonn %O A045851 0,2 %A A045851 _N. J. A. Sloane_