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.

A377014 a(n) is the number of primes p such that p - 6, p + 6 and 2*n - p are also primes.

This page as a plain text file.
%I A377014 #17 Oct 21 2024 14:32:26
%S A377014 0,0,0,0,0,0,1,2,2,2,2,3,2,3,4,1,3,3,0,4,4,2,2,3,3,3,6,3,4,6,0,5,5,1,
%T A377014 6,4,3,5,6,4,3,9,3,2,8,2,4,7,2,4,3,3,5,5,6,4,9,4,4,11,2,5,10,1,4,4,4,
%U A377014 4,4,5,2,7,4,4,9,2,5,6,0,6,7,5,3,6,5,1,10,7,4,9,2,5,9,2,6,5,4,5,4,4
%N A377014 a(n) is the number of primes p such that p - 6, p + 6 and 2*n - p are also primes.
%C A377014 Conjecture: a(n) = 0 only when n = 1, 2, 3, 4, 5, 6, 19, 31, 331, 499.
%e A377014 a(7) = 1 since only when p = 11 are p - 6, p + 6 and 2n - p all prime.
%e A377014 a(12) = 3 from the cases when p is 11, 13 or 17:
%e A377014   when p = 11, {p - 6, p + 6, 2n - p} = {5, 17, 13} are all prime;
%e A377014   when p = 13, {p - 6, p + 6, 2n - p} = {7, 13, 19, 11} are all prime;
%e A377014   when p = 17, {p - 6, p + 6, 2n - p} = {11, 17, 23, 7} are all prime.
%e A377014 a(19) = 0 since 2n = 38 = 7 + 31 = 19 + 19 = 31 + 7, and none of p = 7, 19, 31 can make p - 6 and p + 6 both prime.
%p A377014 f:= proc(n) local i;
%p A377014   nops(select(p -> andmap(isprime,[p,p-6,p+6, 2*n-p]), [seq(i,i=3..2*n,2)]))
%p A377014 end proc:
%p A377014 map(f, [$1..100]); # _Robert Israel_, Oct 13 2024
%t A377014 m = 200; ps = {}; p = 7; While[p = NextPrime[p]; If[PrimeQ[p - 6] && PrimeQ[p + 6], AppendTo[ps, p]]; p < 2*m]; a = {}; Do[ct = 0; k = 0; While[k++; ps[[k]] < n, q = n - ps[[k]]; If[PrimeQ[q], ct++]]; AppendTo[a, ct]; If[ct == 0, AppendTo[b, n]], {n, 2, m, 2}]; a
%Y A377014 Cf. A006489, A045917.
%K A377014 nonn,easy
%O A377014 1,8
%A A377014 _Lei Zhou_, Oct 12 2024