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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A034707 Numbers which are sums of consecutive primes. 12
2, 3, 5, 7, 8, 10, 11, 12, 13, 15, 17, 18, 19, 23, 24, 26, 28, 29, 30, 31, 36, 37, 39, 41, 42, 43, 47, 48, 49, 52, 53, 56, 58, 59, 60, 61, 67, 68, 71, 72, 73, 75, 77, 78, 79, 83, 84, 88, 89, 90, 95, 97, 98, 100, 101, 102, 103, 107, 109, 112, 113, 119, 120, 121, 124, 127 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

A050936 is a subsequence (which still includes primes, embodied by A067377). - Enoch Haga (Enokh(AT)comcast.net), Jun 16 2002, R. J. Mathar, Oct 10 2010

LINKS

T. D. Noe, Table of n, a(n) for n=1..10000

MATHEMATICA

f[n_] := Block[{len = PrimePi@ n}, p = Prime@ Range@ len; Count[ Flatten[ Table[ p[[i ;; j]], {i, len}, {j, i, len}], 1], q_ /; Total@ q == n]]; Select[ Range@ 1000, f@ # > 0 &] (* Or quicker for a larger range *)

lmt = 10000; p = Prime@ Range@ PrimePi@ lmt; t = Table[0, {lmt}]; Do[s = 0; j = i; While[s = s + p[[j]]; s <= lmt, t[[s]]++; j++], {i, Length@ p}]; Select[ Range@ lmt, t[[#]] > 0 &]

upto=200; Select[Union[Flatten[Table[ Total/@Partition[Prime[ Range[ PrimePi[ upto]]], n, 1], {n, upto-1}]]], #<=upto&] (* From Harvey P. Dale, Jul 15 2011 *)

CROSSREFS

Complement is A050940.

Cf. A050936, A050940, A054845.

Sequence in context: A152604 A028788 A197128 * A187909 A156247 A076798

Adjacent sequences:  A034704 A034705 A034706 * A034708 A034709 A034710

KEYWORD

nonn,nice,easy

AUTHOR

Erich Friedman (erich.friedman(AT)stetson.edu)

EXTENSIONS

Updated a misleading comment - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Oct 10 2010

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 15 21:16 EST 2012. Contains 205856 sequences.