OFFSET
1,1
COMMENTS
The first term having a repeated digit is 101.
a(3402) > 10^10.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..12000 (terms 651..3401 from Christopher M. Conrey, terms 1..650 from Colin Barker)
David A. Corneth, PARI program
PROG
(PARI) s=[]; forprime(n=10, 1000, if(#vecsort(eval(Vec(Str(n))), , 8)==2, s=concat(s, n))); s
(PARI) is(n)=isprime(n) && #Set(digits(n))==2 \\ Charles R Greathouse IV, Feb 23 2017
(PARI) \\ See Corneth link
(Python)
from sympy import isprime
from sympy.utilities.iterables import multiset_permutations
from itertools import count, islice, combinations_with_replacement, product
def agen():
for digits in count(2):
s = set()
for pair in product("0123456789", "1379"):
if pair[0] == pair[1]: continue
for c in combinations_with_replacement(pair, digits):
if len(set(c)) < 2 or sum(int(ci) for ci in c)%3 == 0:
continue
for p in multiset_permutations(c):
if p[0] == "0": continue
t = int("".join(p))
if isprime(t):
s.add(t)
yield from sorted(s)
print(list(islice(agen(), 100))) # Michael S. Branicky, Jan 23 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Colin Barker, Jan 04 2014
STATUS
approved