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.

A096474 Difference prime(q+2) - prime(q) as q runs through the lesser members of twin primes (A001359).

This page as a plain text file.
%I A096474 #25 Feb 14 2025 03:41:43
%S A096474 6,6,10,8,18,12,6,14,16,12,24,18,24,18,16,14,24,18,24,18,10,12,18,40,
%T A096474 28,20,24,18,28,10,12,12,8,8,22,16,12,12,14,14,26,36,24,30,24,8,18,30,
%U A096474 12,22,22,16,18,24,10,14,18,14,10,20,10,32,32,12,10,44,30,18,16,36,14,12
%N A096474 Difference prime(q+2) - prime(q) as q runs through the lesser members of twin primes (A001359).
%H A096474 Amiram Eldar, <a href="/A096474/b096474.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1270 from Vincenzo Librandi)
%F A096474 a(n) = prime(A006512(n)) - prime(A001359(n)).
%F A096474 a(n) = A057473(n) - A057470(n). - _Michel Marcus_, Jul 27 2017
%e A096474 {q, q+2} = {17, 19} is the 4th twin-pair and prime(19) - prime(17) = 67 - 59 = 8, so a(4) = 8.
%t A096474 {ta=Table[0, {1300}], tb=Table[0, {1300}], tc=Table[0, {1300}], u=1}; Do[s=Prime[n+1]-Prime[n];If[Equal[s, 2], ta[[u]]=Prime[Prime[n+1]]-Prime[Prime[n]];tb[[u]]=n; tc[[u]]=Prime[n];u=u+1], {n, 1, 10000}];ta
%t A096474 Prime[#[[2]]]-Prime[#[[1]]]&/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&] (* _Harvey P. Dale_, Dec 26 2023 *)
%o A096474 (PARI) lista(nn) = {forprime(q=2, nn, if (isprime(q+2), print1(prime(q+2)-prime(q), ", ")););} \\ _Michel Marcus_, Jul 27 2017
%Y A096474 Cf. A001359, A006512, A057470, A057473.
%K A096474 nonn
%O A096474 1,1
%A A096474 _Labos Elemer_, Jun 23 2004