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!)
A084147 Integers that have exactly 2 representations as sums of consecutive primes. 2
36, 41, 60, 72, 83, 90, 100, 112, 119, 120, 138, 143, 152, 180, 187, 197, 199, 204, 210, 221, 223, 228, 251, 258, 276, 281, 300, 304, 323, 330, 372, 384, 390, 395, 401, 408, 410, 434, 439, 456, 462, 473, 480, 491, 492, 508, 533, 540, 551, 552, 558, 559, 576 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
More fundamental than A067372, which gives integers having 2 *or more* such representations
LINKS
Eric Weisstein's World of Mathematics, Prime Sums
EXAMPLE
36 is in the sequence because it can be written in exactly two ways as sum of consecutive primes: 17+19 and 5+7+11+13.
MAPLE
g:=sum(sum(product(x^ithprime(k), k=i..j), j=i+1..150), i=1..150): gser:=series(g, x=0, 605): a:=proc(n) if coeff(gser, x^n)=2 then op(2, x^n) else fi end: seq(a(n), n=1..600); # Emeric Deutsch, Mar 30 2006
# Alternative
N:= 70: # for terms up to prime(N-1)+prime(N)
P:= [seq(ithprime(i), i=1..N)]: m:= P[N-1]+P[N]:
S:= ListTools:-PartialSums(P):
V:= Vector(m):
for i from 2 while S[i] <= m do V[S[i]]:= 1 od:
for i from 1 to N-2 do
for j from i+2 to N while S[j]-S[i] <= m do V[S[j]-S[i]]:= V[S[j]-S[i]] + 1
od od:
select(t -> V[t] = 2, [$1..m]); # Robert Israel, Feb 14 2021
MATHEMATICA
With[{nn=100}, Take[Sort[Select[Tally[Flatten[Table[Total/@Partition[Prime[Range[nn]], n, 1], {n, 2, nn}]]], #[[2]]==2&]][[All, 1]], nn]] (* Harvey P. Dale, Mar 06 2020 *)
CROSSREFS
Sequence in context: A295492 A225103 A067372 * A261258 A261372 A044862
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, May 15 2003
EXTENSIONS
More terms from John W. Layman, May 21 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 20 06:23 EDT 2024. Contains 371799 sequences. (Running on oeis4.)