OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..81
EXAMPLE
22 belong to the sequence because (2*2)+1=5, (2*2)-1=3, (2+2)+1=5, (2+2)-1=3 and 2+2=2*2.
PROG
(PARI) SumD(x)= s=0; while (x>9, s=s+x-10*(x\10); x=x\10); s + x
ProdD(x)=p=1; while (x>9, p=p*(x-10*(x\10)); x=x\10); p*x
x=9; for (n=0, 78, until(s==p && isprime(s+1) && isprime(s-1) && isprime(p+1) && isprime(p-1), x++; s=SumD(x); p=ProdD(x)); write("b061597.txt", n, " ", x)) \\ Harry J. Smith, Jul 25 2009; does not produce the terms 4 and 6
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felice Russo, May 22 2001
EXTENSIONS
4 and 6 added by Abdul Gaffar Khan, Nov 29 2015
STATUS
approved