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!)
A046864 Smallest number whose digits sum to n-th prime. 1
2, 3, 5, 7, 29, 49, 89, 199, 599, 2999, 4999, 19999, 59999, 79999, 299999, 899999, 5999999, 7999999, 49999999, 89999999, 199999999, 799999999, 2999999999, 8999999999, 79999999999, 299999999999, 499999999999, 899999999999 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Every term a(n), except for 3, has the form i9...9 with k >= 0 nines, where i = 1, 2, 4, 5, 7 or 8. Indeed, {1,2,4,5,7,8} are all digits respectively prime to 9. Therefore, every prime, except for p=3, is in one of the progressions i + 9*k. On the other hand, to reach prime(n) using other digits, we need a greater number of them, which contradicts the minimality of a(n). - Vladimir Shevelev, May 07 2013

LINKS

Table of n, a(n) for n=1..28.

EXAMPLE

E.g. 599 -> 5 + 9 + 9 = prime 23.

MATHEMATICA

sn[n_, k_] := Nest[FromDigits[Flatten[IntegerDigits[{#, 9}]]] &, n, k]; Join[Prime[Range[4]], Table[p = Prime[n]; sn[Mod[p, 9], Quotient[p, 9]], {n, 5, 28}]] (* Jayanta Basu, Jun 29 2013 *)

PROG

(PARI) a(n) = {my(k=1); my(p=prime(n)); while (sumdigits(k) != p, k++); k; } \\ Michel Marcus, Nov 01 2015

CROSSREFS

Sequence in context: A091924 A069108 A156604 * A090712 A082257 A054750

Adjacent sequences:  A046861 A046862 A046863 * A046865 A046866 A046867

KEYWORD

nonn,base,easy

AUTHOR

Patrick De Geest, Oct 15 1999

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 February 22 11:41 EST 2020. Contains 332135 sequences. (Running on oeis4.)