login
A331868
Numbers k for which R(k) + 4*10^floor(k/2-1) is prime, where R(n) = (10^n-1)/9 (repunit: A002275).
2
4, 147, 270, 1288, 1551, 3427
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.
a(7) > 10^4. - Daniel Suteu, Feb 10 2020
a(7) > 5*10^4. - Michael S. Branicky, Nov 02 2024
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
Cf. A105992 (near-repunit primes), A002275 (repunits), A004023 (indices of prime repunits), A011557 (powers of 10).
Cf. A331863, A331860, A331864, A331867 (variants with digit 0, 2, 3 resp. 4 instead of 5), A331869 (variant with floor(n/2) instead of floor(n/2-1)).
Sequence in context: A278845 A159197 A246961 * A180375 A160470 A350985
KEYWORD
nonn,base,hard,more,changed
AUTHOR
M. F. Hasler, Jan 30 2020
EXTENSIONS
a(6) from Daniel Suteu, Feb 10 2020
STATUS
approved