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
5, 3, 89, 83, 71, 59, 53, 41, 29, 17, 11, 3, 887, 863, 827, 821, 809, 773, 761, 753, 719, 683, 653, 647, 641, 617, 599, 569, 557, 521, 509, 491, 479, 443, 431, 401, 383, 359, 353, 347, 317, 281, 257, 239, 227, 191, 179, 173, 137, 113, 89, 71, 59, 53, 47, 29, 23 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

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

LINKS

Table of n, a(n) for n=1..57.

EXAMPLE

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

PROG

(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

CROSSREFS

A145987

Sequence in context: A109254 A258091 A255599 * A180403 A267512 A230389

Adjacent sequences:  A145982 A145983 A145984 * A145986 A145987 A145988

KEYWORD

easy,nonn

AUTHOR

Enoch Haga, Oct 27 2008

STATUS

approved

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 April 24 04:00 EDT 2019. Contains 322406 sequences. (Running on oeis4.)