A332118
a(n) = (10^(2n+1) - 1)/9 + 7*10^n.
Original entry on oeis.org
8, 181, 11811, 1118111, 111181111, 11111811111, 1111118111111, 111111181111111, 11111111811111111, 1111111118111111111, 111111111181111111111, 11111111111811111111111, 1111111111118111111111111, 111111111111181111111111111, 11111111111111811111111111111, 1111111111111118111111111111111
Offset: 0
- Brady Haran and Simon Pampena, Glitch Primes and Cyclops Numbers, Numberphile video (2015).
- Patrick De Geest, Palindromic Wing Primes: (1)8(1), updated: June 25, 2017.
- Makoto Kamada, Factorization of 11...11811...11, updated Dec 11 2018.
- Index entries for linear recurrences with constant coefficients, signature (111,-1110,1000).
Cf.
A138148 (cyclops numbers with binary digits),
A002113 (palindromes),
A077798 (palindromic wing primes),
A088281 (primes 1..1x1..1),
A068160 (smallest of given length),
A053701 (vertically symmetric numbers).
Cf.
A332112 ..
A332119 (variants with different middle digit 2, ..., 9).
-
A332118 := n -> (10^(2*n+1)-1)/9+7*10^n;
-
Array[(10^(2 # + 1)-1)/9 + 7*10^# &, 15, 0]
-
apply( {A332118(n)=10^(n*2+1)\9+7*10^n}, [0..15])
-
def A332118(n): return 10**(n*2+1)//9+7*10**n
A068161
Smallest prime beginning and ending in at least n 3's.
Original entry on oeis.org
3, 33533, 3331333, 3333133333, 333331033333, 33333362333333, 333333313333333, 333333332933333333, 33333333316333333333, 3333333333133333333333, 33333333333733333333333
Offset: 1
a(2) = 33533 is a prime that starts with 33 and ends in 33 (two 3's).
-
Join[{3},Table[With[{c=PadRight[{},n,3]},Module[{k=1},While[!PrimeQ[FromDigits[Join[c,IntegerDigits[k],c]]],k++];FromDigits[Join[c,IntegerDigits[k],c]]]],{n,2,15}]] (* Harvey P. Dale, Sep 02 2025 *)
A366416
a(n) is the first prime that starts and ends with at least n 1's (in base 10).
Original entry on oeis.org
11, 11, 1114111, 111181111, 111110611111, 1111118111111, 111111151111111, 111111110911111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111, 1111111111111111111
Offset: 1
a(3) = 1114111 which is prime and starts and ends with 3 1's.
-
f:= proc(n) local x,s,d;
for d from n to 2*n-1 do
if isprime((10^d-1)/9) then return (10^d-1)/9 fi
od;
s:= (10^n-1)/9;
for d from n do
for x from 10^d*s + s by 10^n to 10^d*(s+1) do
if isprime(x) then return x fi
od od
end proc:
map(f, [$1..20]);
-
from gmpy2 import is_prime
def a(n):
t = (10**n-1)//9
for d in range(n, 2*n):
if is_prime(t): return t
t = 10*t + 1
suffix = (10**n-1)//9
d = 2*n
while True:
prefix = 10**(d-n)*suffix
for mid in range(0,10**(d-n),10**n):
t = prefix + mid + suffix
if is_prime(t): return t
d += 1
print([a(n) for n in range(1,18)]) # Michael S. Branicky, Oct 10 2023
A068162
Smallest prime beginning and ending in at least n 7's.
Original entry on oeis.org
7, 77377, 7772777, 777767777, 77777677777, 7777774777777, 777777727777777, 77777777677777777, 77777777704777777777, 777777777727777777777, 77777777777677777777777, 7777777777772777777777777, 777777777777757777777777777
Offset: 1
a(2) = 77377 is a prime that starts with 77 and ends in 77 (two 7's).
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 07 2003
A068163
Smallest prime beginning and ending in at least n 9's.
Original entry on oeis.org
919, 990599, 99901999, 9999049999, 99999199999, 99999901999999, 9999999239999999, 99999999299999999, 9999999992999999999, 9999999999049999999999, 999999999990599999999999, 99999999999904999999999999
Offset: 1
a(2) = 990599 is a prime that starts with 99 and ends in 99.
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 31 2003
Showing 1-5 of 5 results.
Comments