login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers n for which R(n) + 3*10^floor(n/2-1) is prime, where R(n) = (10^n-1)/9 (repunit: A002275).
3

%I #28 Feb 10 2020 06:15:09

%S 68,5252,5494,7102

%N Numbers n for which R(n) + 3*10^floor(n/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) + 3*10^floor(n/2-1) has ceiling(n/2) digits 1, one digit 4, and again floor(n/2-1) digits 1. For odd and even n, the digit 4 is just to the right of the middle of the number.

%C For odd n = 2m + 1, f(n) = R(n) + 3*10^floor(n/2-1) is divisible by 3, 7 or 13 when m is congruent 1 or 4, 3 or 5, resp. 0 or 2 (mod 6): there can't be an odd term.

%C For even n = 2m, f(n) is divisible by 3 or 7 when m is congruent to 0 or 3, resp. 1 or 2 (mod 6). When m = 6k + 4, then f(n) is prime for k = 5 and 437 (and no further k <= 600), and divisible by 23 or 53 when k is congruent to 10 (mod 11) resp. 3 (mod 13). When m = 6k + 5, f(n) is prime for k = 457 and 591 and no other value up to 600, and divisible by 23, 47, 53, 97, 163, 181, 859, ... for k congruent to 5 (mod 11), 11 (mod 23), 5 (mod 13), 0 (mod 32), 13 (mod 27), 26 (mod 30), 3 (mod 13), ..., respectively.

%C a(5) > 7272.

%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 = 2, R(2) + 3*10^floor(2/2-1) = 14 = 2*7 is not prime.

%e For n = 3, R(3) + 3*10^floor(3/2-1) = 114 = 2*3*19 is not prime.

%e For n = 4, R(4) + 3*10^floor(4/2) = 1141 = 7*163 is not prime.

%e For n = 5, R(5) + 3*10^floor(5/2) = 11141 = 13*857 is not prime.

%e 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.

%t Select[Range[2, 2500], PrimeQ[(10^# - 1)/9 + 3*10^Floor[#/2 - 1]] &] (* corrected by _Amiram Eldar_, Feb 10 2020 *)

%o (PARI) for(n=2,9999,isprime(p=10^n\9+3*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. A331860, A331863, A331864 (variants with digit 2, 0 resp. 3 instead of 4), A331866 (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