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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061336 Smallest number of triangular numbers which sum to n. 10
0, 1, 2, 1, 2, 3, 1, 2, 3, 2, 1, 2, 2, 2, 3, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 2, 3, 2, 1, 2, 2, 2, 3, 3, 2, 3, 1, 2, 2, 2, 3, 3, 2, 2, 3, 1, 2, 3, 2, 2, 3, 2, 3, 3, 3, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 1, 2, 3, 2, 2, 3, 2, 2, 3, 3, 2, 3, 1, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 2, 1, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 2, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

a(n)=3 if n=5 or 8 mod 9, since triangular numbers are {0,1,3,6} mod 9.

LINKS

Giovanni Resta, Table of n, a(n) for n = 0..10000

FORMULA

a(n) = 0 if n=0, otherwise 1 if n is in A000217, otherwise 2 if n is in A051533, otherwise 3 in which case n is in A020757.

EXAMPLE

a(3)=1 since 3=3, a(4)=2 since 4=1+3, a(5)=3 since 5=1+1+3, with 1 and 3 being triangular.

MATHEMATICA

t[n_]:=n*(n+1)/2; a[0]=0; a[n_]:=Block[ {k=1, tt= t/@ Range[Sqrt[2*n]]}, Off[IntegerPartitions::take]; While[{} == IntegerPartitions[n, {k}, tt, 1], k++]; k]; a/@ Range[0, 104] (* Giovanni Resta, Jun 09 2015 *)

PROG

(PARI) see A283370 for generic code, working but not optimized for this case of triangular numbers. - M. F. Hasler, Mar 06 2017

CROSSREFS

Cf. A000217, A007294, A057945, A061337, A051533, A020757.

Cf. A104246 (analog for A000292), A283365 (analog for A000332), A283370 (analog for A000389).

Sequence in context: A128117 A023115 A194436 * A057945 A285730 A280055

Adjacent sequences:  A061333 A061334 A061335 * A061337 A061338 A061339

KEYWORD

nonn

AUTHOR

Henry Bottomley, Apr 25 2001

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 20 08:05 EDT 2019. Contains 327214 sequences. (Running on oeis4.)