Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Nov 02 2024 14:37:33
%S 4,147,270,1288,1551,3427
%N Numbers k for which R(k) + 4*10^floor(k/2-1) is prime, where R(n) = (10^n-1)/9 (repunit: A002275).
%C The corresponding primes are a subsequence of A105992: near-repunit primes.
%C 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.
%C a(7) > 10^4. - _Daniel Suteu_, Feb 10 2020
%C a(7) > 5*10^4. - _Michael S. Branicky_, Nov 02 2024
%H Brady Haran and Simon Pampena, <a href="https://www.youtube.com/watch?v=HPfAnX5blO0">Glitch Primes and Cyclops Numbers</a>, Numberphile video (2015).
%H <a href="/index/Pri#primes_involving_repunits_.2C_sequences_related_to_">Index to OEIS entries related to primes involving repdigits</a>.
%e For n = 4, R(4) + 4*10^floor(4/2-1) = 1151 is prime.
%e For n = 5, R(5) + 4*10^floor(5/2-1) = 11151 = 3^3*7*59 is not prime.
%e For n = 147, R(147) + 4*10^72 = 1(74)51(72) is prime, where (.) indicates how many times the preceding digit is repeated.
%t Select[Range[2, 2500], PrimeQ[(10^# - 1)/9 + 4*10^Floor[#/2 - 1]] &]
%o (PARI) for(n=2,9999,isprime(p=10^n\9+4*10^(n\2-1))&&print1(n","))
%Y Cf. A105992 (near-repunit primes), A002275 (repunits), A004023 (indices of prime repunits), A011557 (powers of 10).
%Y 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)).
%K nonn,base,hard,more
%O 1,1
%A _M. F. Hasler_, Jan 30 2020
%E a(6) from _Daniel Suteu_, Feb 10 2020