OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..100
EXAMPLE
a(4) = 101111 because 1111=11*101, 21111=3*31*227, 31111=53*587, 41111=7^2*829, 51111=3^4*631, 61111=23*2657, 71111=17*47*89, 81111=3*19*1423, 91111=179*509 so 101111 is the first prime ending in four 1's.
MATHEMATICA
pe[n_]:=Module[{k=0, len=IntegerLength[n]}, While[Mod[k, 10]==1||(!PrimeQ[ k*10^len+n]), k++]; k*10^len+n]; pe/@Table[(10^n-1)/9, {n, 20}] (* Harvey P. Dale, Dec 31 2013 *)_
PROG
(PARI) { b=0; f=1; for (n=1, 100, b=10*b + 1; f*=10; k=0; while (!isprime(b + k*f), if (k%10, k++, k+=2)); write("b065821.txt", n, " ", b + k*f) ) } \\ Harry J. Smith, Nov 01 2009
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Nov 23 2001
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jul 04 2003
STATUS
approved