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.

A240696 Prime numbers n such that replacing each digit d in the decimal expansion of n with its 9's complement produces a prime.

This page as a plain text file.
%I A240696 #13 Sep 13 2017 02:16:21
%S A240696 2,7,97,997,99999999999999997
%N A240696 Prime numbers n such that replacing each digit d in the decimal expansion of n with its 9's complement produces a prime.
%C A240696 a(n) = {2} union {primes of the form 10^n - 3} = {2} union {A093172}.
%C A240696 Primes p such that A061601(p) is also prime.
%C A240696 The next term has 140 digits.
%e A240696 997 is in the sequence because 997 becomes (002) = 2, which is prime.
%t A240696 lst={};f[n_]:=Block[{a=IntegerDigits[Prime[n]],b="",k=1,l},l=Length[a];While[k<l+1,b=StringJoin[b,ToString[9-a[[k]]]];k++];ToExpression[b]];Do[If[PrimeQ[f[n]],AppendTo[lst, Prime[n]]],{n,1,10^6}];lst
%Y A240696 Cf. A093172, A173833.
%K A240696 nonn,base
%O A240696 1,1
%A A240696 _Michel Lagneau_, Apr 10 2014