login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A320584
Numbers whose first digit is prime.
2
2, 3, 5, 7, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217
OFFSET
1,1
MATHEMATICA
Select[Range@ 218, PrimeQ@ First@ IntegerDigits@ # &] (* Michael De Vlieger, Nov 05 2018 *)
PROG
(PARI) isok(n) = isprime(digits(n)[1]); \\ Michel Marcus, Oct 17 2018
(PARI) a(n) = n--; my (w=1); while (n >= 4*w, n -= 4*w; w*=10); w*prime(1+n\w) + (n%w) \\ Rémy Sigrist, Nov 16 2018
CROSSREFS
Supersequence of A320585 (primes whose first digit is prime).
Sequence in context: A048420 A048405 A110457 * A209191 A162948 A024768
KEYWORD
nonn,base
AUTHOR
Kritsada Moomuang, Oct 16 2018
STATUS
approved