[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a077779 -id:a077779
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers n such that (10^(2n+1)+18*10^n-1)/9 is prime.
+10
45
0, 1, 2, 19, 97, 9818
OFFSET
1,3
COMMENTS
A number n is in the sequence iff the palindromic number 1(n).3.1(n) is prime (1(n) means n copies of 1; dot between numbers means concatenation). If n is a positive term of the sequence then n is not of the form 3m, 6m+4, 12m+10, 28m+5, 28m+8, etc. (the proof is easy).
The palindromic number 1(n).2.1(n) is never prime for n > 0 because it is (1.0(n-1).1)*(1(n+1)). - Robert Israel, Jun 11 2015
a(7) > 10^5. - Robert Price, Apr 02 2016
REFERENCES
C. Caldwell and H. Dubner, "Journal of Recreational Mathematics", Volume 28, No. 1, 1996-97, pp. 1-9.
FORMULA
a(n) = (A077779(n-1)-1)/2, for n > 1. [Corrected by M. F. Hasler, Feb 06 2020]
EXAMPLE
19 is in the sequence because the palindromic number (10^(2*19+1)+18*10^19-1)/9 = 1(19).3.1(19) = 111111111111111111131111111111111111111 is prime.
MAPLE
select(n -> isprime((10^(2*n+1)+18*10^n-1)/9), [$0..100]); # Robert Israel, Jun 11 2015
MATHEMATICA
Do[If[PrimeQ[(10^(2n + 1) + 18*10^n - 1)/9], Print[n]], {n, 2500}]
PROG
(PARI) for(n=0, 1e4, if(ispseudoprime(t=(10^(2*n+1)+18*10^n)\9), print1(t", "))) \\ Charles R Greathouse IV, Jul 15 2011
KEYWORD
nonn,base,more
AUTHOR
Farideh Firoozbakht, May 19 2005
EXTENSIONS
Edited by Ray Chandler, Dec 28 2010
STATUS
approved
a(n) = (10^(2n+1)-1)/9 + 2*10^n.
+10
11
3, 131, 11311, 1113111, 111131111, 11111311111, 1111113111111, 111111131111111, 11111111311111111, 1111111113111111111, 111111111131111111111, 11111111111311111111111, 1111111111113111111111111, 111111111111131111111111111, 11111111111111311111111111111, 1111111111111113111111111111111
OFFSET
0,1
COMMENTS
See A107123 = {0, 1, 2, 19, 97, 9818, ...} for the indices of primes.
LINKS
Brady Haran and Simon Pampena, Glitch Primes and Cyclops Numbers, Numberphile video (2015).
Patrick De Geest, Palindromic Wing Primes: (1)3(1), updated: June 25, 2017.
Makoto Kamada, Factorization of 11...11311...11, updated Dec 11 2018.
FORMULA
a(n) = A138148(n) + 3*10^n = A002275(2n+1) + 2*10^n.
G.f.: (3 - 202*x + 100*x^2)/((1 - x)(1 - 10*x)(1 - 100*x)).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n > 2.
MAPLE
A332113 := n -> (10^(2*n+1)-1)/9+2*10^n;
MATHEMATICA
Array[(10^(2 # + 1)-1)/9 + 2*10^# &, 15, 0]
PROG
(PARI) apply( {A332113(n)=10^(n*2+1)\9+2*10^n}, [0..15])
(Python) def A332113(n): return 10**(n*2+1)//9+2*10**n
CROSSREFS
Cf. (A077779-1)/2 = A107123: indices of primes; A331864 & A331865 (non-palindromic variants).
Cf. A002275 (repunits R_n = (10^n-1)/9), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits), A002113 (palindromes).
Cf. A332123 .. A332193 (variants with different repeated digit 2, ..., 9).
Cf. A332112 .. A332119 (variants with different middle digit 2, ..., 9).
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 09 2020
STATUS
approved
Numbers n for which R(n) + 2*10^floor(n/2) is prime, where R(n) = (10^n-1)/9.
+10
4
0, 1, 2, 3, 5, 6, 8, 12, 20, 39, 74, 78, 80, 84, 104, 195, 654, 980, 2076, 5940
OFFSET
1,3
COMMENTS
The corresponding primes are a subsequence of A105992: near-repunit primes.
In base 10, R(n) + 2*10^floor(n/2) has ceiling(n/2)-1 digits 1, one digit 3, and again floor(n/2) digits 1 (except for n=0). For odd n, this is a palindrome (a.k.a. wing prime, cf. A077779), for even n the digit 3 is just left to the middle of the number.
LINKS
Brady Haran and Simon Pampena, Glitch Primes and Cyclops Numbers, Numberphile video (2015).
EXAMPLE
For n = 0, R(0) + 2*10^floor(0/2) = 2 is prime.
For n = 1, R(1) + 2*10^floor(1/2) = 3 is prime.
For n = 2, R(2) + 2*10^floor(2/2) = 31 is prime.
For n = 3, R(3) + 2*10^floor(3/2) = 131 is prime.
For n = 5, R(5) + 2*10^floor(5/2) = 11311 is prime.
For n = 6, R(6) + 2*10^floor(6/2) = 113111 is prime.
MATHEMATICA
Select[Range[0, 2500], PrimeQ[(10^# - 1)/9 + 2*10^Floor[#/2]] &] (* Michael De Vlieger, Jan 31 2020 *)
PROG
(PARI) for(n=0, 9999, isprime(p=10^n\9+2*10^(n\2))&&print1(n", "))
CROSSREFS
Cf. A105992 (near-repunit primes), A002275 (repunits), A004023 (indices of prime repunits), A011557 (powers of 10).
Cf. A331860 & A331863 (variants with digit 2 resp. 0 instead of 3), A331864 (variant with floor(n/2-1) instead of floor(n/2)).
Cf. A077779 (odd terms).
KEYWORD
nonn,base,hard,more
AUTHOR
M. F. Hasler, Jan 30 2020
EXTENSIONS
a(17)-a(19) from Giovanni Resta, Jan 30 2020
STATUS
approved

Search completed in 0.012 seconds