login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A086167 Sum of the first n lower twin primes. 0
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; internal format)
OFFSET

1,1

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 (* From Vladimir Orlovsky (4vladimir(AT)gmail.com), Sep 30 2008 *)

Accumulate[Transpose[Select[Partition[Prime[Range[200]], 2, 1], #[[2]] - #[[1]] == 2 &]][[1]]] (* From 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: A184444 A139020 A147358 * A083186 A055341 A007326

Adjacent sequences:  A086164 A086165 A086166 * A086168 A086169 A086170

KEYWORD

nonn

AUTHOR

Cino Hilliard (hillcino368(AT)gmail.com), Aug 25 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 02:31 EST 2012. Contains 205978 sequences.