|
|
A090537
|
|
Least n-digit prime using digit 3 once and rest all 1, or 0 if no such prime exists.
|
|
4
|
|
|
3, 13, 113, 0, 11113, 113111, 0, 11111131, 111111113, 0, 11111111113, 111113111111, 0, 31111111111111, 0, 0, 11111111113111111, 111111111111111131, 0, 11111111111111111131, 131111111111111111111, 0, 11111111111111111311111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(3n+1) = 0.
|
|
PROG
|
(Python)
from sympy import isprime
def agen():
digits = 0
while True:
for i in range(digits+1):
t = int("1"*(digits-i) + "3" + "1"*i)
if isprime(t): yield t; break
else: yield 0
digits += 1
g = agen()
|
|
CROSSREFS
|
Without zeros, subsequence of A107689.
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|