login
a(1) = 1; for n > 1, a(n) is the smallest even number not already in the sequence such that a(1) + ... + a(n) is a prime.
9

%I #33 Jun 13 2021 09:01:46

%S 1,2,4,6,10,8,12,16,14,24,30,22,18,26,34,36,20,28,38,40,32,42,46,48,

%T 44,52,56,60,54,58,66,50,64,62,70,84,90,72,92,76,86,94,74,88,68,82,80,

%U 102,96,100,114,98,78,112,120,110,108,106,126,122,130,132,134,124,128,118

%N a(1) = 1; for n > 1, a(n) is the smallest even number not already in the sequence such that a(1) + ... + a(n) is a prime.

%C Essentially the same as A054408. - _R. J. Mathar_, Dec 15 2008

%C Conjecture: Every even number appears. - _N. J. A. Sloane_, May 29 2017

%H Chai Wah Wu, <a href="/A073659/b073659.txt">Table of n, a(n) for n = 1..10000</a> (terms n = 1..4097 from N. J. A. Sloane).

%t t = {1}; Do[i = 2; While[! PrimeQ[Total[t] + i] || MemberQ[t, i], i += 2]; AppendTo[t, i], {65}]; t (* _Jayanta Basu_, Jul 04 2013 *)

%o (PARI) v=[1];n=1;while(n<200,if(isprime(n+vecsum(v))&&!vecsearch(vecsort(v),n),v=concat(v,n);n=0);n++);v \\ _Derek Orr_, Jun 01 2015

%Y Cf. A054408, A073660.

%Y See A055265 for a version where the sums of two adjacent terms are primes.

%K nonn,easy

%O 1,2

%A _Amarnath Murthy_, Aug 10 2002

%E More terms from _Sascha Kurz_, Jan 28 2003

%E Offset corrected by _Chai Wah Wu_, Aug 27 2017