A331867 Numbers n for which R(n) + 3*10^floor(n/2-1) is prime, where R(n) = (10^n-1)/9 (repunit: A002275).
68, 5252, 5494, 7102
Offset: 1
Examples
For n = 2, R(2) + 3*10^floor(2/2-1) = 14 = 2*7 is not prime. For n = 3, R(3) + 3*10^floor(3/2-1) = 114 = 2*3*19 is not prime. For n = 4, R(4) + 3*10^floor(4/2) = 1141 = 7*163 is not prime. For n = 5, R(5) + 3*10^floor(5/2) = 11141 = 13*857 is not prime. For n = 68, R(68) + 3*10^floor(68/2) = 1...1141...1 is prime, with 34 digits '1' to the left of a digit '4' and 33 digits '1' to its right.
Links
- Brady Haran and Simon Pampena, Glitch Primes and Cyclops Numbers, Numberphile video (2015).
- Index to OEIS entries related to primes involving repdigits.
Crossrefs
Programs
-
Mathematica
Select[Range[2, 2500], PrimeQ[(10^# - 1)/9 + 3*10^Floor[#/2 - 1]] &] (* corrected by Amiram Eldar, Feb 10 2020 *)
-
PARI
for(n=2,9999,isprime(p=10^n\9+3*10^(n\2-1))&&print1(n","))
Comments