login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A146758 Last prime subtrahend at 10^n in A146757. 2
7, 97, 983, 9941, 99839, 999983, 9998239, 99999989, 999950881, 9999999929, 99999999833, 999999999989, 9999999999863, 99999999999971, 999999961946087, 9999999999999917, 99999999989350667, 999999999999999989 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
A(2)=97 because 97 is the 15th and last prime difference under 10^2.
MAPLE
A146758 := proc(n) local p: p:=10^n: do p:=prevprime(p): if(isprime(ceil(evalf(sqrt(p)))^2-p))then return p: fi: od: end: seq(A146758(n), n=1..14); # Nathaniel Johnston, Oct 01 2011
PROG
(UBASIC) 10 'sq less pr are prime 20 N=1:O=1:C=1 30 A=3:S=sqrt(N):if N>10^3 then print N, C-1:stop 40 B=N\A 50 if B*A=N then 100 60 A=A+2 70 if A<=S then 40 80 R=O^2:Q=R-N 90 if N<R and N=prmdiv(N) and Q=prmdiv(Q) then if Q>1 print R; N; Q; C:N=N+2:C=C+1:goto 30 100 N=N+2:if N<R then 30:else O=O+1:goto 80
CROSSREFS
Sequence in context: A030540 A071361 A007810 * A114019 A178007 A241206
KEYWORD
more,nonn
AUTHOR
Enoch Haga, Nov 02 2008
EXTENSIONS
a(8)-a(18) from Nathaniel Johnston, Oct 01 2011
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 3 18:21 EST 2023. Contains 367540 sequences. (Running on oeis4.)