Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A069224
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A069224 Numbers n such that there exists a prime p >= n+2 such that n^2 + n + p is prime. +0
1
2, 3, 5, 6, 7, 8, 9, 12, 13, 14, 15, 20, 30, 32, 35, 36, 37, 38, 39, 44, 47, 49, 56, 60, 63, 65, 66, 75, 80, 84, 90, 93, 96, 98, 102, 104, 110, 113, 117, 119, 125, 129, 130, 133, 139, 140, 145, 146, 149, 150, 153, 155, 159, 162, 167, 170, 179, 180, 183, 184, 192 (list; graph; listen)
OFFSET

1,1

COMMENT

Let K be the number of entries in the sequence less than or equal to M. Then the ratio K/M is nearly monotone decreasing. I do not know if the sequence converges, but if it does, it will be to a number less than 0.30.

LINKS

M. Scovetta, Prime Generator

EXAMPLE

35 is a term because 35^2 + 35 + 37 = 1297, which is prime.

PROGRAM

(Perl) open(GOOD, ">good.txt"); open(BAD, ">bad.txt"); my $MAX = 10000; for ($n=2; $n<$MAX; $n++) { $prime_found = 0; for ($p=$n+2; $p<=$MAX+2; $p++) { if (isPrime($p) == 1) { $prime_found = 1; last; } } $total++; if ($prime_found == 1 && isPrime($n*$n + $n + $p) == 1) { print "$n, "; $success++; } } close(GOOD); close(BAD);

sub isPrime { my $c = shift; my $prime = 1; for (my $i=2; $i<sqrt($c+1); $i++) { if ($c/$i == int($c/$i)) { $prime = 0; last; } } return $prime; }

CROSSREFS

Sequence in context: A095274 A079111 A007989 this_sequence A117578 A039122 A031975

Adjacent sequences: A069221 A069222 A069223 this_sequence A069225 A069226 A069227

KEYWORD

nonn

AUTHOR

Michael V. Scovetta (mike(AT)scovetta.com), Apr 12 2002

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 July 26 13:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research