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!)
A062688 Smallest triangular number with digit sum n (or 0 if no such number exists). 3
1, 0, 3, 0, 0, 6, 0, 0, 36, 28, 0, 66, 0, 0, 78, 0, 0, 378, 496, 0, 1596, 0, 0, 8385, 0, 0, 5778, 5995, 0, 8778, 0, 0, 47895, 0, 0, 67896, 58996, 0, 196878, 0, 0, 468996, 0, 0, 887778, 1788886, 0, 4896885, 0, 0, 5897895, 0, 0, 13999986, 15997996, 0, 38997696 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

From Jon E. Schoenfield, Dec 04 2021: (Start)

a(n) = 0 iff n == (2,4,5,7,8) mod 9.

Nonzero terms are not nondecreasing; e.g., a(9)=36 > a(10)=28.

(End)

LINKS

Jon E. Schoenfield, Table of n, a(n) for n = 1..168

EXAMPLE

66 is the smallest triangular number with digit sum 12, so a(12)=66.

PROG

(PARI) a(n) = if (vecsearch([2, 4, 5, 7, 8], n % 9), return (0)); my(k=1); while (sumdigits(k*(k+1)/2) != n, k++); k*(k+1)/2; \\ Michel Marcus, Dec 12 2021

CROSSREFS

Cf. A000217, A007953, A055264, A068808.

Sequence in context: A127773 A194498 A193986 * A067181 A321429 A145225

Adjacent sequences:  A062685 A062686 A062687 * A062689 A062690 A062691

KEYWORD

base,nonn

AUTHOR

Erich Friedman, Jul 04 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 12 23:52 EDT 2022. Contains 356077 sequences. (Running on oeis4.)