OFFSET
1,1
EXAMPLE
32 belongs to this sequence as its 9's complement is 67, which is prime.
PROG
(Python)
nmax=500
def is_prime(num):
if num == 0 or num == 1: return(0)
for k in range(2, num):
if (num % k) == 0:
return(0)
return(1)
def c9(num):
s=str(num)
l=len(str(num))
n=""
for k in range(l):
n = n+str(9-int(s[k]))
return(int(n))
ris = ""
for i in range(2, nmax):
if is_prime(c9(i)):
ris = ris+str(i)+", "
print(ris)
(PARI) complement(n) = my(d=digits(n)); for(k=1, #d, d[k]=9-d[k]); subst(Pol(d), x, 10)
is(n) = ispseudoprime(complement(n)) \\ Felix Fröhlich, Sep 03 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Pierandrea Formusa, Sep 03 2018
STATUS
approved