A068645 Primes in which a string of 3's is sandwiched between two 1's.
11, 131, 13331, 1333331, 13333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333331
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..7
- Patrick De Geest, PDP Reference Table - 131.
- Makoto Kamada, Prime numbers of the form 133...331.
- Index entries for primes involving repunits.
Programs
-
Mathematica
Select[Flatten[Table[10*FromDigits[PadRight[{1},n,3]]+1,{n,120}]],PrimeQ] (* Harvey P. Dale, Aug 09 2020 *)
-
Python
from sympy import isprime from itertools import count, islice def agen(): yield from (t for i in count(0) if isprime(t:=int("1" + "3"*i + "1"))) print(list(islice(agen(), 7))) # Michael S. Branicky, Jan 27 2023
Extensions
More terms from Sascha Kurz, Mar 26 2002
Edited by Ray Chandler, Nov 04 2014
Comments