login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(0)=1; for n>=1, a(n) = smallest prime > a(n-1) such that (sum{k=0 to n} a(k)) is composite.
3

%I #13 Mar 08 2015 20:28:31

%S 1,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,61,67,71,73,79,83,89,97,

%T 101,103,107,109,113,127,131,137,139,149,151,157,167,173,179,181,191,

%U 193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281

%N a(0)=1; for n>=1, a(n) = smallest prime > a(n-1) such that (sum{k=0 to n} a(k)) is composite.

%C Although superficially similar to A049561, the two sequences are in fact quite different (see for example A138982).

%H R. J. Mathar, Apr 30 2008, <a href="/A138980/b138980.txt">Table of n, a(n) for n = 0..112</a>

%p A138980 := proc(n) option remember ; local i,p ; if n = 0 then 1 ; else for p from nextprime(A138980(n-1)) do if isprime(p) then if not isprime( p+add(A138980(i),i=0..n-1) ) then RETURN(p) ; fi ; fi ; od: fi ; end: seq(A138980(n),n=0..120) ; # _R. J. Mathar_ Apr 30 2008

%Y Cf. A138981, A138982, A049561.

%K nonn

%O 0,2

%A _Leroy Quet_, Apr 05 2008

%E More terms from _R. J. Mathar_, Apr 30 2008