login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242307 Squares-greedy summable numbers. 3

%I #4 May 20 2014 23:48:20

%S 5,10,13,14,17,20,21,25,26,29,30,34,35,37,40,41,45,46,49,50,53,54,58,

%T 59,62,63,65,68,69,73,74,77,78,80,81,82,85,86,90,91,94,95,97,98,101,

%U 104,105,109,110,113,114,116,117,120,121,122,125,126,130,131,134

%N Squares-greedy summable numbers.

%C Greedy sums and summability are defined at A242305.

%H Clark Kimberling, <a href="/A242307/b242307.txt">Table of n, a(n) for n = 1..500</a>

%e a(1) = 5 = 4 + 1; a(2) = 9 + 1

%e a(3) = 13 = 9 + 4; a(4) = 14 = 9 + 4 + 1.

%t z = 200; s = Table[n^2, {n, 1, z}]; s1 = Table[n, {n, 1, z}]; t = Table[{s1[[n]], #, Total[#] == s1[[n]]} &[DeleteCases[-Differences[FoldList[If[#1 - #2 >= 0, #1 - #2, #1] &, s1[[n]],

%t Reverse[Select[s, # < s1[[n]] &]]]], 0]], {n, z}]

%t r[n_] := s1[[n]] - Total[t[[n]][[2]]];

%t tr = Table[r[n], {n, 2, z}] (* A242305 *)

%t c = Table[Length[t[[n]][[2]]], {n, 2, z}] (* A242306 *)

%t f = 1 + Flatten[Position[tr, 0]] (* A242307 *) (* _Peter J. C. Moses_, May 06 2014 *)

%Y Cf. A242305, A242306, A241833, A000027, A000290.

%K nonn,easy

%O 1,1

%A _Clark Kimberling_, May 11 2014

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)