cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A276192 Numbers n such that there is no twin prime pair between A000217(n) and A000217(n+1) (n > 0).

Original entry on oeis.org

1, 3, 6, 9, 12, 15, 17, 26, 27, 30, 32, 36, 37, 38, 42, 43, 48, 51, 55, 65, 69, 75, 77, 108, 123, 131, 134, 149, 161, 172, 175, 221, 229, 345, 353, 613
Offset: 1

Views

Author

Altug Alkan, Aug 24 2016

Keywords

Comments

Numbers n such that there is no pair of twin primes p, p+2 with n*(n+1)/2 <= p < p+2 < (n+1)*(n+2)/2.
Number of twin prime pairs between A000217(n) and A000217(n+1) are 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 2, 0, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 2, 1, 0, 1, 0, 1, 2, 2, 0, 0, 0, 1, 3, 1, 0, 0, 2, 2, 1, 1, 0, 1, 4, 0, 1, 2, 1, 0, 2, 2, 1, 1, 2, 2, 1, 1, 5, 0, 2, 2, 1, 0, 1, 1, 2, 2, 2, 0, 2, 0, 1, 1, 3, 4, 2, 3, ...
Probably the sequence is finite, and a(36)=613 is the last term. If a(37) exists, then a(37)>10000. - Andrey Zabolotskiy, Aug 24 2016
a(37) > 10^8. - Dana Jacobsen, Aug 29 2016

Examples

			3 is a term because there is no twin prime pair between A000217(3) = 6 and A000217(4) = 10, even though 7 is one of a prime pair and between 6 and 10, 5 isn't so the pair doesn't exclude 3.
		

Crossrefs

Programs

  • Mathematica
    t[n_] := n(n+1)/2;
    is[n_] := !Or@@Table[PrimeQ[k] && PrimeQ[k+2], {k, t[n], t[n+1]-3}];
    Select[Range[700], is] (* Andrey Zabolotskiy, Aug 24 2016 *)
  • Perl
    use ntheory ":all"; sub is_a276192 { my $n=shift; my $t=($n*$n+$n)>>1; twin_prime_count($t,$t+$n+1-2) == 0; } # Dana Jacobsen, Aug 29 2016
    
  • Perl
    use ntheory ":all"; sub is_a276192 { my($n,$t,$e,$p,$prev)=(shift); $t = ($n*$n+$n)>>1; $e=$t+$n+1-2; $p = next_prime($t-1); $prev = next_prime($p); ($prev, $p) = ($p, next_prime($p)) while ($p-$prev) != 2;  $prev > $e; }    my $n=1; for (1..36) { $n++ until is_a276192($n); say "$ ",$n++; } # _Dana Jacobsen, Aug 29 2016