OFFSET
1,3
COMMENTS
The corresponding primes are a subsequence of A105992: near-repunit primes.
In base 10, R(n) + 2*10^floor(n/2) has ceiling(n/2)-1 digits 1, one digit 3, and again floor(n/2) digits 1 (except for n=0). For odd n, this is a palindrome (a.k.a. wing prime, cf. A077779), for even n the digit 3 is just left to the middle of the number.
LINKS
Brady Haran and Simon Pampena, Glitch Primes and Cyclops Numbers, Numberphile video (2015).
EXAMPLE
For n = 0, R(0) + 2*10^floor(0/2) = 2 is prime.
For n = 1, R(1) + 2*10^floor(1/2) = 3 is prime.
For n = 2, R(2) + 2*10^floor(2/2) = 31 is prime.
For n = 3, R(3) + 2*10^floor(3/2) = 131 is prime.
For n = 5, R(5) + 2*10^floor(5/2) = 11311 is prime.
For n = 6, R(6) + 2*10^floor(6/2) = 113111 is prime.
MATHEMATICA
Select[Range[0, 2500], PrimeQ[(10^# - 1)/9 + 2*10^Floor[#/2]] &] (* Michael De Vlieger, Jan 31 2020 *)
PROG
(PARI) for(n=0, 9999, isprime(p=10^n\9+2*10^(n\2))&&print1(n", "))
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
M. F. Hasler, Jan 30 2020
EXTENSIONS
a(17)-a(19) from Giovanni Resta, Jan 30 2020
STATUS
approved