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.

A296338 a(n) = number of partitions of n into consecutive positive squares.

This page as a plain text file.
%I A296338 #72 Apr 18 2019 22:04:30
%S A296338 1,0,0,1,1,0,0,0,1,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0,2,0,0,0,1,1,0,0,0,0,
%T A296338 0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,
%U A296338 0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,0,1,1
%N A296338 a(n) = number of partitions of n into consecutive positive squares.
%H A296338 Seiichi Manyama, <a href="/A296338/b296338.txt">Table of n, a(n) for n = 1..10000</a>
%F A296338 a(A034705(n)) >= 1 for n > 1.
%F A296338 G.f.: Sum_{i>=1} Sum_{j>=i} Product_{k=i..j} x^(k^2). - _Ilya Gutkovskiy_, Apr 18 2019
%e A296338    1 = 1^2,                   so  a(1) = 1.
%e A296338    4 = 2^2,                   so  a(4) = 1.
%e A296338    5 = 1^2 + 2^2,             so  a(5) = 1.
%e A296338    9 = 3^2,                   so  a(9) = 1.
%e A296338   13 = 2^2 + 3^2,             so a(13) = 1.
%e A296338   14 = 1^2 + 2^2 + 3^2,       so a(14) = 1.
%e A296338   16 = 4^2,                   so a(16) = 1.
%e A296338   25 = 3^2 + 4^2 = 5^2,       so a(25) = 2.
%e A296338   29 = 2^2 + 3^2 + 4^2,       so a(29) = 1.
%e A296338   30 = 1^2 + 2^2 + 3^2 + 4^2, so a(30) = 1.
%t A296338 nMax = 100; t = {0}; Do[k = n; s = 0; While[s = s + k^2; s <= nMax, AppendTo[t, s]; k++], {n, 1, nMax}]; tt = Tally[t]; a[_] = 0; Do[a[tt[[i, 1]]] = tt[[i, 2]], {i, 1, Length[tt]}]; Table[a[n], {n, 1, nMax}] (* _Jean-François Alcover_, Feb 04 2018, using _T. D. Noe_'s program for A034705 *)
%o A296338 (Ruby)
%o A296338 def A296338(n)
%o A296338   m = Math.sqrt(n).to_i
%o A296338   ary = Array.new(n + 1, 0)
%o A296338   (1..m).each{|i|
%o A296338     sum = i * i
%o A296338     ary[sum] += 1
%o A296338     i += 1
%o A296338     sum += i * i
%o A296338     while sum <= n
%o A296338       ary[sum] += 1
%o A296338       i += 1
%o A296338       sum += i * i
%o A296338     end
%o A296338   }
%o A296338   ary[1..-1]
%o A296338 end
%o A296338 p A296338(100)
%Y A296338 Cf. A000290, A001227, A034705, A130052, A234304, A297199, A298467, A299173.
%K A296338 nonn
%O A296338 1,25
%A A296338 _Seiichi Manyama_, Jan 14 2018