login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062535 Don't be greedy! Difference between number of squares needed to sum to n using the greedy algorithm and using the best such sum. 1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 2, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; internal format)
OFFSET

1,32

FORMULA

a(n) =A053610(n)-A002828(n).

EXAMPLE

a(32)=5-2=3 since 32 can be written greedily as 25+4+1+1+1 or efficiently as 16+16.

CROSSREFS

Sequence in context: A061853 A010104 A030121 * A171063 A151795 A008437

Adjacent sequences:  A062532 A062533 A062534 * A062536 A062537 A062538

KEYWORD

nonn

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), Jun 25 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 13:08 EST 2012. Contains 205623 sequences.