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.

This page as a plain text file.
%I A112785 #15 Dec 11 2024 15:29:29
%S A112785 79997,79999,777977,777979,7977797,7977799,77997779,77997977,77997979,
%T A112785 99777779,799999799,977797979,977999777,977999779,979797779,999799979,
%U A112785 7777997999,7797799979,7979997797,7979997799,7999777997,7999777999,7999797977,7999797979
%N A112785 Members of twin prime pairs using only digits 7 and 9.
%H A112785 Charles R Greathouse IV, <a href="/A112785/b112785.txt">Table of n, a(n) for n = 1..10000</a>
%t A112785 Select[Flatten[Table[FromDigits/@Tuples[{7,9},n],{n,2,11}]],PrimeQ[#] && Or@@PrimeQ[#+{2,-2}]&] (* _Harvey P. Dale_, Nov 06 2013 *)
%o A112785 (PARI) istwin(n)=ispseudoprime(n)&&ispseudoprime(if(n%3==1,n-2,n+2))
%o A112785 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)
%o A112785 \\ _Charles R Greathouse IV_, Nov 06 2013
%Y A112785 Subsequence of A020471.
%K A112785 base,nonn
%O A112785 1,1
%A A112785 _Amarnath Murthy_, Jan 02 2006
%E A112785 Edited and extended by _D. S. McNeil_, Nov 27 2010
%E A112785 Corrected and extended by _Harvey P. Dale_, Nov 06 2013