login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A086167 a(n) = sum of the first n lower twin primes. 4
3, 8, 19, 36, 65, 106, 165, 236, 337, 444, 581, 730, 909, 1100, 1297, 1524, 1763, 2032, 2313, 2624, 2971, 3390, 3821, 4282, 4803, 5372, 5971, 6588, 7229, 7888, 8697, 9518, 10345, 11202, 12083, 13102, 14133, 15182, 16243, 17334, 18485 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
For n = 4 we have twin prime pairs (3,5) (5,7) (11,13) (17,19) and 3 + 5 + 11 + 17 = 36.
MATHEMATICA
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 *)
Accumulate[Transpose[Select[Partition[Prime[Range[200]], 2, 1], #[[2]] - #[[1]] == 2 &]][[1]]] (* Harvey P. Dale, Feb 02 2011 *)
PROG
(PARI) addnexttwin(n)= { s=0; for(x=1, n, if(prime(x+1)-prime(x)==2, s=s+prime(x); print1(s", ")) ) }
CROSSREFS
Sequence in context: A139020 A147358 A209367 * A083186 A055341 A067332
KEYWORD
nonn
AUTHOR
Cino Hilliard, Aug 25 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)