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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282342 a(n) is the smallest prime number, with sum of digits equals n and a(n) is greater than previous nonzero terms, except if this is not possible in which case a(n)=0 0
0, 2, 3, 13, 23, 0, 43, 53, 0, 73, 83, 0, 139, 149, 0, 277, 359, 0, 379, 389, 0, 499, 599, 0, 997, 1889, 0, 1999, 2999, 0, 4999, 6899, 0, 17989, 18899, 0, 29989, 39989, 0, 49999, 59999, 0, 79999, 98999, 0, 199999, 389999, 0, 598999, 599999, 0, 799999, 989999, 0, 2998999 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

I conjecture that there are prime numbers for every n, if n is not divisible by 3.

Other terms:

a(97) = 79999999999;

a(98) = 98999999999;

a(100) = 298999999999;

a(1000) = 299989999999999999999999999999999999999999999999999999999999999999

          9999999999999999999999999999999999999999999999.

LINKS

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

EXAMPLE

a(23) = 599 because 599 is a prime number greater than a(22) = 499 and the sum of its digits is 5 + 9 + 9 = 23.

a(24) = 0 because 24 (mod 3) = 0.

MATHEMATICA

a = {1}; Do[If[n != 3 && Divisible[n, 3], AppendTo[a, 0], p = NextPrime@ Max@ a; While[Total@ IntegerDigits@ p != n, p = NextPrime@ p]; AppendTo[a, p]], {n, 2, 57}]; a (* Michael De Vlieger, Feb 12 2017 *)

PROG

(PARI) {

print1(0", "2", ");

n=3; p=3; sp=3;

while(p<1000000,

        while(sp<>n,

                  p=nextprime(p+1);

                  sp=sumdigits(p);

                );

                 print1(p", ");

                 n++; if(n%3==0, n++; print1(0", "));

        )

}

CROSSREFS

Cf. A067180.

Sequence in context: A019226 A138699 A077248 * A137248 A136260 A296932

Adjacent sequences:  A282339 A282340 A282341 * A282343 A282344 A282345

KEYWORD

nonn,base

AUTHOR

Dimitris Valianatos, Feb 12 2017

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 January 20 10:58 EST 2020. Contains 331081 sequences. (Running on oeis4.)