|
Search: id:A069224
|
|
|
| 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
|
|
|
Search completed in 0.002 seconds
|