login
A112785
Members of twin prime pairs using only digits 7 and 9.
1
79997, 79999, 777977, 777979, 7977797, 7977799, 77997779, 77997977, 77997979, 99777779, 799999799, 977797979, 977999777, 977999779, 979797779, 999799979, 7777997999, 7797799979, 7979997797, 7979997799, 7999777997, 7999777999, 7999797977, 7999797979
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Flatten[Table[FromDigits/@Tuples[{7, 9}, n], {n, 2, 11}]], PrimeQ[#] && Or@@PrimeQ[#+{2, -2}]&] (* Harvey P. Dale, Nov 06 2013 *)
PROG
(PARI) istwin(n)=ispseudoprime(n)&&ispseudoprime(if(n%3==1, n-2, n+2))
do(D)=my(v=List(), t); for(d=5, D, for(i=0, 2^d-1, t=sum(j=0, d-1, if(bittest(i, j), 9, 7)*10^j); if(istwin(t), listput(v, t)))); Vec(v)
\\ Charles R Greathouse IV, Nov 06 2013
CROSSREFS
Sequence in context: A185473 A235075 A229700 * A106775 A258951 A234756
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Jan 02 2006
EXTENSIONS
Edited and extended by D. S. McNeil, Nov 27 2010
Corrected and extended by Harvey P. Dale, Nov 06 2013
STATUS
approved