This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A241834 Number of terms in the greedy residue sum for n^2. 4
 1, 2, 3, 2, 3, 3, 4, 3, 3, 4, 4, 2, 3, 3, 4, 4, 4, 3, 3, 4, 4, 3, 4, 2, 3, 3, 4, 4, 4, 4, 5, 3, 3, 4, 4, 3, 4, 4, 5, 2, 3, 3, 4, 4, 4, 4, 5, 3, 4, 3, 3, 4, 4, 3, 4, 4, 5, 4, 4, 2, 3, 3, 4, 4, 4, 4, 5, 3, 4, 4, 5, 3, 3, 4, 4, 3, 4, 4, 5, 4, 4, 5, 5, 2, 3, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,2 COMMENTS Greedy residue sums are introduced at A241833. LINKS Clark Kimberling, Table of n, a(n) for n = 2..2000 EXAMPLE n ... n^2 ... a(n) 1 ..  1 .... (undefined) 2 ... 4 .... 1 = # terms in 1 3 ... 9 .... 2 = # the terms in 4 + 1 4 ... 16 ... 3 = # terms in 9 + 4 + 1 5 ... 25 ... 2 = # terms in 16 + 9 6 ... 36 ... 3 = # terms in 25 + 9 + 1 7 ... 49 ... 3 = # terms in 36 + 9 + 4 8 ... 64 ... 4 = # terms in 49 + 9 + 4 + 1 MATHEMATICA z = 200;  s = Table[n^2, {n, 1, z}]; t = Table[{s[[n]], #, Total[#] == s[[n]]} &[   DeleteCases[-Differences[FoldList[If[#1 - #2 >= 0, #1 - #2, #1] &, s[[n]], Reverse[Select[s, # < s[[n]] &]]]], 0]], {n, z}]; r[n_] := s[[n]] - Total[t[[n]][[2]]]; tr =  Table[r[n], {n, 2, z}]  (* A241833 *) c = Table[Length[t[[n]][[2]]], {n, 2, z}] (* A241834 *) f = 1 + Flatten[Position[tr, 0]]  (* A241835 *) f^2  (* A241836 *) (* Peter J. C. Moses, May 06 2014 *) CROSSREFS Cf. A241832, A241835, A241836, A000290. Sequence in context: A273040 A319982 A304331 * A086389 A128622 A026256 Adjacent sequences:  A241831 A241832 A241833 * A241835 A241836 A241837 KEYWORD nonn,easy AUTHOR Clark Kimberling, May 09 2014 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 17 14:18 EST 2018. Contains 317276 sequences. (Running on oeis4.)