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.

A341267 Gaps between first elements of quadruple primes of the form {p, p+2, p+6, p+12}.

Original entry on oeis.org

6, 6, 24, 60, 126, 120, 294, 450, 186, 150, 54, 6, 120, 1080, 840, 390, 84, 126, 510, 150, 144, 3300, 1230, 870, 1446, 330, 1794, 726, 1434, 3360, 1326, 264, 546, 714, 1470, 1836, 1104, 30, 1026, 204, 336, 744, 2226, 810, 240, 1050, 270, 1914, 60, 876, 1980
Offset: 1

Views

Author

James S. DeArmon, Feb 07 2021

Keywords

Comments

Primes in the quadruple need not be sequential primes.

Examples

			The first 6 quadruples are (5,7,11,17), (11,13,17,23), (17,19,23,29), (41,43,47,53), (101,103,107,113), (227,229,233,239), so the first 5 terms of the sequence are 11-5=6, 17-11=6, 41-17=24, 101-41=60, 227-101=126.
		

Crossrefs

Cf. A172454.

Programs

  • Maple
    b:= proc(n) option remember; local p; p:= `if`(n=1, 1, b(n-1));
          do p:= nextprime(p);
             if andmap(isprime, [p+2, p+6, p+12]) then return p fi
          od
        end:
    a:= n-> b(n+1)-b(n):
    seq(a(n), n=1..65);  # Alois P. Heinz, Feb 14 2021
  • Mathematica
    Differences[Select[Prime[Range[5000]],AllTrue[#+{2,6,12},PrimeQ]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 21 2021 *)
  • Perl
    # See DeArmon link.

Formula

a(n) = A172454(n+1) - A172454(n).