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.

A086168 a(n) = sum of the first n upper twin primes.

This page as a plain text file.
%I A086168 #18 Jan 03 2020 07:48:57
%S A086168 5,12,25,44,75,118,179,252,355,464,603,754,935,1128,1327,1556,1797,
%T A086168 2068,2351,2664,3013,3434,3867,4330,4853,5424,6025,6644,7287,7948,
%U A086168 8759,9582,10411,11270,12153,13174,14207,15258,16321,17414,18567
%N A086168 a(n) = sum of the first n upper twin primes.
%H A086168 Amiram Eldar, <a href="/A086168/b086168.txt">Table of n, a(n) for n = 1..10000</a>
%e A086168 For n = 4 we have twin prime pairs (3,5) (5,7) (11,13) (17,19) and 5 + 7 + 13 + 19 = 44.
%t A086168 lst={};s=0;Do[p=Prime[n];If[PrimeQ[p-2], s+=p;AppendTo[lst, s]], {n, 6!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Sep 30 2008 *)
%t A086168 Accumulate[Transpose[Select[Partition[Prime[Range[200]],2,1],Last[#]-First[#]==2&]][[2]]]  (* _Harvey P. Dale_, Feb 08 2011 *)
%o A086168 (PARI) addnexttwin(n)= { s=0; for(x=1,n, if(prime(x+1)-prime(x)==2,s=s+prime(x+1); print1(s",")) ) }
%Y A086168 Cf. A006512, A086167.
%K A086168 nonn
%O A086168 1,1
%A A086168 _Cino Hilliard_, Aug 25 2003