cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

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