login
A102707
a(n) = least k such that k*(10^n) -1 or +1, or both, is/are prime.
1
1, 1, 1, 2, 5, 2, 3, 2, 6, 6, 3, 11, 18, 4, 5, 6, 13, 11, 15, 3, 6, 14, 6, 6, 61, 8, 2, 2, 3, 9, 48, 48, 21, 15, 6, 30, 3, 9, 6, 18, 6, 33, 30, 3, 60, 6, 24, 33, 33, 8, 71, 31, 11, 2, 5, 3, 24, 9, 16, 39, 19, 6, 9, 53, 60, 6, 26, 3, 16, 23, 17, 19, 44, 6, 131, 56, 8, 26, 9, 42, 12, 3, 24, 41
OFFSET
0,4
LINKS
EXAMPLE
for n=0 1*(10^0)+1=2 prime so a(0)=1
for n=1 1*(10^1)+1=11 prime so a(1)=1
for n=2 1*(10^2)+1=101 prime so a(2)=1
for n=3 2*(10^3)-1=1999 prime so a(3)=2
MATHEMATICA
\Table[Module[{k=1}, While[NoneTrue[k 10^n+{1, -1}, PrimeQ], k++]; k], {n, 0, 90}] (* Harvey P. Dale, Jun 01 2022 *)
CROSSREFS
Sequence in context: A049413 A300691 A377698 * A134486 A088006 A078311
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 05 2005
EXTENSIONS
Initial term of b-file corrected by N. J. A. Sloane, Aug 31 2009
Definition clarified by Harvey P. Dale, Jun 01 2022
STATUS
approved