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!)
A157477 Number of values k < n for which k is a greedy sum of squares. 0
0, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 9, 10, 10, 10, 11, 12, 12, 12, 12, 13, 14, 14, 14, 15, 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 21, 22, 22, 22, 22, 23, 24, 24, 24, 25, 26, 26, 26, 27, 28, 28, 28, 28, 29, 30, 30, 30, 31, 32, 33, 34, 34, 34, 35, 36, 36, 36, 36, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Table of n, a(n) for n=0..74.

H. L Montgomery, U. M. A. Vorhauer, Greedy sums of distinct squares, Math. Comp. 73 (2004) 493-513, Table 1. [MR2034134].

MAPLE

greeds := proc(n) local arem, a, j ; arem := n ; a := [] ; while arem > 0 do j := floor(sqrt(arem)) ; a := [op(a), j] ; arem := arem-j^2 ; od: a ; end: isGreedS := proc(n) option remember; local L; L := greeds(n) ; RETURN( nops(L) = nops( convert(L, set)) ) ; end: a := proc(n) local resul, i ; resul := 0 ; for i from 0 to n-1 do if isGreedS(i) then resul := resul+1 ; fi; od: resul ; end: seq(a(n), n=0..80) ;

CROSSREFS

Sequence in context: A162351 A087816 A072000 * A248801 A006949 A194814

Adjacent sequences:  A157474 A157475 A157476 * A157478 A157479 A157480

KEYWORD

easy,nonn

AUTHOR

R. J. Mathar, Mar 01 2009

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 19 09:06 EDT 2020. Contains 337178 sequences. (Running on oeis4.)