cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A112785 Members of twin prime pairs using only digits 7 and 9.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Jan 02 2006

Keywords

Crossrefs

Subsequence of A020471.

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits/@Tuples[{7,9},n],{n,2,11}]],PrimeQ[#] && Or@@PrimeQ[#+{2,-2}]&] (* Harvey P. Dale, Nov 06 2013 *)
  • 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

Extensions

Edited and extended by D. S. McNeil, Nov 27 2010
Corrected and extended by Harvey P. Dale, Nov 06 2013