OFFSET
1,1
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, section C2.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Carlos Rivera, Puzzle 46. Primes expressible as sum of consecutive primes in K ways, The Prime Puzzles and Problems Connection.
FORMULA
A054845(a(n)) = 3. - Ray Chandler, Sep 20 2023
EXAMPLE
41 can be expressed as 41 or 11+13+17 or 2+3+5+7+11+13, so 41 is in the sequence.
MAPLE
N:= 10^4: # to get all terms <= N
P:= [0, op(select(isprime, [2, seq(i, i=3..N, 2)]))]:
nP:= nops(P);
S:= ListTools:-PartialSums(P):
V:= Vector(N):
for i from 1 to nP-1 do
for j from i+1 to nP while S[j] - S[i] <= N do
V[S[j]-S[i]]:= V[S[j]-S[i]]+1
od od:
select(t -> V[t] = 3, [$1..N]): # Robert Israel, Apr 05 2017
MATHEMATICA
Module[{nn = 300, s}, s = Array[Prime, nn]; Keys@ Take[Select[KeySort@ Merge[Table[PositionIndex@ Map[Total, Partition[s, k, 1]], {k, nn/2}], Identity], Length@ # == 3 &], Floor[nn/6]]] (* Michael De Vlieger, Apr 06 2017, Version 10 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jud McCranie, May 30 2000
STATUS
approved