cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A060341 Non-adding primes: next term is smallest prime not the sum of any primes so far.

This page as a plain text file.
%I A060341 #14 Dec 20 2024 12:58:46
%S A060341 2,3,7,11,17,41,47,83,89,307,311,613,617,919,2801,3109,3413,9283,
%T A060341 15461,25087,37781,87613,106181,284509,296591,618269,1196609,1774921,
%U A060341 3564677,5339287,9818789,14295223,23196731,46393469,93691861,98171363,190948399,429204473
%N A060341 Non-adding primes: next term is smallest prime not the sum of any primes so far.
%C A060341 Primes can only be used once in any sum.
%H A060341 Jinyuan Wang, <a href="/A060341/b060341.txt">Table of n, a(n) for n = 1..1000</a>
%H A060341 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_127.htm">Puzzle 127. Non adding prime sequences</a>, The Prime Puzzles & Problems Connection.
%e A060341 5 is not included because 2 + 3 = 5. Given 2, 3, 7 we can get 5 but not 11, so term after 7 is 11.
%e A060341 13 is not included because 2 + 11 = 13.
%o A060341 (PARI) lista(nn) = my(p=2, i, j, s, t, u, v=[2, 1], w); print1(p); for(n=2, nn, u=0; i=1; j=1; w=List([]); s=0; t=1; while(i<=#v, if(j>#v, if(i%2==t, s+=v[i], t=!t; listput(w, s); s=v[i]); i++, if(v[i]>u, if((i%2&&j%2)==t, s+=u, t=!t; listput(w, s); s=u); v[i]-=u; if(j++<=#v, u=v[j]), if((i%2&&j%2)==t, s+=v[i], t=!t; listput(w, s); s=v[i]); if(v[i]==u, if(j++<=#v, u=v[j]), u-=v[i]); i++))); listput(w, s); v=w; s=0; i=0; until(isprime(p), p++; while(s<=p&&i<#v, s+=v[i++]); if(s>p&&!(i%2), p=s)); print1(", ", v[1]=p)); \\ _Jinyuan Wang_, Dec 17 2024
%Y A060341 Cf. A225947, A379045.
%K A060341 nonn
%O A060341 1,1
%A A060341 _Jason Earls_, Apr 10 2001
%E A060341 a(37)-a(53) from _Jacques Tramu_, Jan 11 2005
%E A060341 Offset changed to 1 by _Jinyuan Wang_, Dec 17 2024