login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A145985 Primes resulting from subtracting primes from 10^n in sequence 1

%I

%S 5,3,89,83,71,59,53,41,29,17,11,3,887,863,827,821,809,773,761,753,719,

%T 683,653,647,641,617,599,569,557,521,509,491,479,443,431,401,383,359,

%U 353,347,317,281,257,239,227,191,179,173,137,113,89,71,59,53,47,29,23

%N Primes resulting from subtracting primes from 10^n in sequence

%C Some duplicate primes result from the subtraction algorithm applied, e.g., 3.

%e A(13)=887 because 1000-887 = 113 and both 887 and 113 are prime.

%o (UBASIC) 10 'complementary primes under 10^n 20 N=3 30 A=3:S=sqrt(N) 40 B=N\A 50 if B*A=N then 140 60 A=A+2 70 if A<=S then 40 90 if N<10 then T=10-N:if T=prmdiv(T) then print T;N; 100 if N>=10 and N<100 then H=100-N:if H=prmdiv(H) then print H;N; 110 if N>=100 and N<1000 then U=1000-N:if U=prmdiv(U) then print U;N; 120 if N>=1000 and N<10000 then V=10000-N:if V=prmdiv(V) then print V;N 130 if N>10000 then stop 131 stop 140 N=N+2:goto 30

%Y A145987

%K easy,nonn

%O 1,1

%A _Enoch Haga_, Oct 27 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 19 08:25 EDT 2019. Contains 323389 sequences. (Running on oeis4.)