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

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A145172 Number of pentagonal numbers needed to represent n with greedy algorithm. 2
 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 2, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 2, 3, 4, 5, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 2, 3, 4, 5, 6, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 2, 3, 4, 5, 6, 3, 4, 5, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Sequence is unbounded. LINKS Andrew Howroyd, Table of n, a(n) for n = 1..10000 EXAMPLE a(21)=6 since 21 = 12+5+1+1+1+1. PROG (PARI) a(n)={my(s=0); forstep(k=(sqrtint(24*n+1)+1)\6, 1, -1, my(t=k*(3*k-1)/2); s+=n\t; n%=t); s} \\ Andrew Howroyd, Apr 21 2021 CROSSREFS Cf. A000326 (pentagonal numbers), A053610, A057945, A180447, A192988. Sequence in context: A053344 A092196 A100878 * A338484 A338493 A280053 Adjacent sequences:  A145169 A145170 A145171 * A145173 A145174 A145175 KEYWORD nonn AUTHOR Christina Steffan (christina.steffan(AT)gmx.at), Oct 03 2008 EXTENSIONS Terms a(41) and beyond from Andrew Howroyd, Apr 21 2021 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.

Last modified December 4 09:10 EST 2021. Contains 349484 sequences. (Running on oeis4.)