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.

A376892 Numbers k such that the sum of the first k greater of twin primes is a greater of twin prime.

Original entry on oeis.org

1, 45, 105, 675, 987, 1431, 1593, 1677, 1785, 1875, 2037, 2541, 3039, 3045, 3051, 3183, 3267, 3531, 3699, 4113, 4239, 4377, 4443, 5643, 5673, 5709, 6027, 6543, 6615, 6771, 6891, 6915, 6999, 8043, 8109, 8313, 8607, 8739, 10197, 10569, 11103, 11139, 11361, 11787, 12045
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 08 2024

Keywords

Crossrefs

Programs

  • Maple
    K:= 1: count:= 1: s:= 5: k:= 1:
    for p from 7 by 6 do
      if isprime(p) and isprime(p-2) then
        k:= k+1;
        s:= s+p;
        if s mod 6 = 1 and isprime(s) and isprime(s-2) then
          count:= count+1; K:= K, k;
          if count = 100 then break fi;
    fi fi od:
    K; # Robert Israel, Nov 08 2024
  • PARI
    lista(nn) = my(v=select(p->isprime(p-2), primes(nn)), s = vector(#v)); s[1] = v[1]; for (i=2, #v, s[i] = s[i-1]+v[i]); Vec(select(x->(isprime(x) && isprime(x-2)), s, 1)); \\ Michel Marcus, Oct 10 2024