|
|
A331868
|
|
Numbers n for which R(n) + 4*10^floor(n/2-1) is prime, where R(n) = (10^n-1)/9 (repunit: A002275).
|
|
2
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The corresponding primes are a subsequence of A105992: near-repunit primes.
In base 10, R(n) + 4*10^floor(n/2-1) has ceiling(n/2) digits 1, one digit 5, and again floor(n/2-1) digits 1. For odd and even n as well, the digit 5 appears just to the right of the middle of the number.
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 4, R(4) + 4*10^floor(4/2-1) = 1151 is prime.
For n = 5, R(5) + 4*10^floor(5/2-1) = 11151 = 3^3*7*59 is not prime.
For n = 147, R(147) + 4*10^72 = 1(74)51(72) is prime, where (.) indicates how many times the preceding digit is repeated.
|
|
MATHEMATICA
|
Select[Range[2, 2500], PrimeQ[(10^# - 1)/9 + 4*10^Floor[#/2 - 1]] &]
|
|
PROG
|
(PARI) for(n=2, 9999, isprime(p=10^n\9+4*10^(n\2-1))&&print1(n", "))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|