A065580 Smallest prime ending in exactly n 3's.
3, 233, 2333, 23333, 733333, 10333333, 83333333, 1033333333, 17333333333, 23333333333, 2633333333333, 10333333333333, 53333333333333, 3233333333333333, 1333333333333333, 23333333333333333, 2033333333333333333, 10333333333333333333, 173333333333333333333, 1733333333333333333333
Offset: 1
Links
- Harry J. Smith, Table of n, a(n) for n = 1..100
Programs
-
Mathematica
Do[a = Table[3, {n} ]; k = 0; While[ b = FromDigits[ Join[ IntegerDigits[k], a]]; Mod[k, 10] == 3 || !PrimeQ[b], k++ ]; Print[b], {n, 1, 17} ]
-
PARI
a(n)={ my(t=10^n, b=(t-1)/3, d=0); while (!isprime(b + t*d), d++; if(d%10==3, d++)); b + t*d } \\ Harry J. Smith, Oct 23 2009