Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A157495
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A157495 The first prime difference between the primes and their preceeding squares. +0
1
2, 2, 5, 3, 2, 13, 13, 3, 7, 13, 31, 37, 5, 7, 11, 17, 23, 61, 3, 7, 37, 43, 2, 53, 61, 37, 3, 7, 73, 13, 127, 31, 37, 103, 5, 7, 13, 19, 23, 29, 79, 37, 47, 157, 53, 3, 67, 79, 2, 193, 37, 43, 97, 107, 61, 7, 13, 127, 241, 137, 139, 37, 163, 167, 277, 61, 7, 13, 23, 313, 29, 103 (list; graph; listen)
OFFSET

1,1

COMMENT

If the only preceeding square k such that p-k^2 is prime is 0, then we generate sequence A065377.

EXAMPLE

The 7-th prime is 17. The preceeding squares of 17 are 16,9,4,1,0. The differences are

17-16=1, 17-9=8, 17-4=13, 17-1=16 and 17-0=17. Then 4 is the first preceeding square

of 17 that can be subtracted from 17 to get a prime. So 13 is in the sequence. If we

decline the prime 13 in this fashion, we have 13-9=4,13-1=12,13-0=13. This shows

that 0 is the first square that can be subtract from 13 to get a prime number. So 13

is in the 6-th place in the sequence.

PROGRAM

(PARI) g(n)= c=0; forprime(x=2, n, for(k=1, n^2, if(issquare(abs(x-k))&&isprime(k),

print1(k", "); c++; break))); c

CROSSREFS

Sequence in context: A076561 A132851 A146316 this_sequence A128134 A157223 A130327

Adjacent sequences: A157492 A157493 A157494 this_sequence A157496 A157497 A157498

KEYWORD

nonn

AUTHOR

Cino Hilliard (hillcino368(AT)hotmail.com), Mar 01 2009

EXTENSIONS

Definition and example clarified following a request from Zak Seidov. - Cino Hilliard (hillcino368(AT)hotmail.com), Apr 13 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 1 19:22 EST 2009. Contains 167811 sequences.


AT&T Labs Research