login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A296338 a(n) = number of partitions of n into consecutive positive squares. 5
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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,25

LINKS

Seiichi Manyama, Table of n, a(n) for n = 1..10000

FORMULA

a(A034705(n)) >= 1 for n > 1.

G.f.: Sum_{i>=1} Sum_{j>=i} Product_{k=i..j} x^(k^2). - Ilya Gutkovskiy, Apr 18 2019

EXAMPLE

   1 = 1^2,                   so  a(1) = 1.

   4 = 2^2,                   so  a(4) = 1.

   5 = 1^2 + 2^2,             so  a(5) = 1.

   9 = 3^2,                   so  a(9) = 1.

  13 = 2^2 + 3^2,             so a(13) = 1.

  14 = 1^2 + 2^2 + 3^2,       so a(14) = 1.

  16 = 4^2,                   so a(16) = 1.

  25 = 3^2 + 4^2 = 5^2,       so a(25) = 2.

  29 = 2^2 + 3^2 + 4^2,       so a(29) = 1.

  30 = 1^2 + 2^2 + 3^2 + 4^2, so a(30) = 1.

MATHEMATICA

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 *)

PROG

(Ruby)

def A296338(n)

  m = Math.sqrt(n).to_i

  ary = Array.new(n + 1, 0)

  (1..m).each{|i|

    sum = i * i

    ary[sum] += 1

    i += 1

    sum += i * i

    while sum <= n

      ary[sum] += 1

      i += 1

      sum += i * i

    end

  }

  ary[1..-1]

end

p A296338(100)

CROSSREFS

Cf. A000290, A001227, A034705, A130052, A234304, A297199, A298467, A299173.

Sequence in context: A271231 A306798 A086079 * A133703 A073265 A338326

Adjacent sequences:  A296335 A296336 A296337 * A296339 A296340 A296341

KEYWORD

nonn

AUTHOR

Seiichi Manyama, Jan 14 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 19:36 EDT 2021. Contains 347608 sequences. (Running on oeis4.)