login
A075569
a(1)=1, then smallest number >= the previous term such that every partial sum is a prime.
0
1, 1, 1, 2, 2, 4, 6, 6, 6, 8, 10, 12, 12, 12, 14, 16, 18, 18, 18, 24, 32, 34, 36, 38, 42, 46, 48, 54, 56, 64, 68, 78, 90, 90, 94, 102, 114, 122, 124, 134, 144, 148, 150, 152, 160, 168, 170, 178, 182, 190, 192, 200, 216, 220, 222, 234, 234, 234, 246, 260, 264, 268, 270
OFFSET
1,4
MATHEMATICA
a[1] = 1; a[n_] := a[n] = For[an = a[n-1], True, an++, If[AllTrue[ac = Rest @ Accumulate[Append[Array[a, n-1], an]], PrimeQ], Return[an]]]; Array[a, 100] (* Jean-François Alcover, Feb 17 2018 *)
CROSSREFS
Sequence in context: A316788 A038759 A045999 * A338276 A062722 A160731
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 25 2002
EXTENSIONS
More terms from David Wasserman, Jan 20 2005
STATUS
approved