login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A146315
Prime differences of primes subtracted from nearest square
5
2, 7, 11, 13, 23, 29, 31, 47, 53, 59, 61, 79, 83, 89, 97, 127, 131, 137, 139, 167, 173, 179, 191, 193, 223, 227, 233, 239, 251, 293, 307, 311, 313, 317, 359, 383, 389, 397, 439, 443, 461, 467, 479, 547, 557, 563, 569, 571, 647, 653, 659, 673, 727, 743, 761, 773
OFFSET
1,1
COMMENTS
Terms in A146315 + A146316 produce a square
FORMULA
{p in A000040: A068527(p) in A000040}. - R. J. Mathar, Sep 26 2011
EXAMPLE
a(6)=29 because when the prime 29 is subtracted from the square 36, the result is another prime, 7
PROG
(UBASIC) 10 'sq less pr are prime 20 N=1:O=1:C=1 30 A=3:S=sqrt(N) 40 B=N\A 50 if B*A=N then 120 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 print R; N; Q:N=N+2:C=C+1:goto 30 100 if C>31 then stop 120 N=N+2:if N<R then 30:else O=O+1:goto 80
CROSSREFS
Sequence in context: A027697 A364470 A235475 * A038892 A019346 A045369
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Oct 30 2008
STATUS
approved