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.

A284014 Numbers k such that {k + 2, k + 4} and {k^2 + 2, k^2 + 4} are both twin prime pairs.

Original entry on oeis.org

1, 3, 15, 57, 147, 2085, 6687, 6957, 11055, 15267, 17385, 17577, 20505, 20637, 23667, 26247, 31077, 31317, 32115, 32967, 34497, 39225, 47775, 52065, 53715, 55335, 56205, 58365, 62187, 63585, 66567, 67215, 70875, 77235, 77475, 82005, 85827, 89595, 89817, 107505
Offset: 1

Views

Author

K. D. Bajpai, Mar 18 2017

Keywords

Comments

After a(1), all the terms are multiples of 3.
After a(2), all the terms are congruent to 5 or 7 (mod 10).

Examples

			a(2) = 3, {3 + 2 = 5, 3 + 4 = 7} and {3^2 + 2 = 11, 3^2 + 4 = 13} are twin prime pairs.
a(3) = 15, {15 + 2 = 17, 15 + 4 = 19} and {15^2 + 2 = 227, 15^2 + 4 = 229} are twin prime pairs.
		

Crossrefs

Appears to be the intersection of A086381 and A256388, but that may be unproven.

Programs

  • Magma
    [n: n in [0..100000] | IsPrime(n+2) and IsPrime(n+4) and IsPrime(n^2+2) and IsPrime(n^2+4)];
    
  • Mathematica
    Select[Range[1000000], PrimeQ[# + 2] && PrimeQ[# + 4] && PrimeQ[#^2 + 2] && PrimeQ[#^2 + 4] &]
  • PARI
    for(n=1, 100000,2; if(isprime(n+2) && isprime(n+4) && isprime(n^2+2) &&isprime(n^2+4), print1(n, ", ")))
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A284014 (MATCHING-POS 1 1 (lambda (n) (and (= 1 (A010051 (+ n 2))) (= 1 (A010051 (+ n 4))) (= 1 (A010051 (+ (* n n) 2))) (= 1 (A010051 (+ (* n n) 4)))))))
    ;; Antti Karttunen, Apr 15 2017