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.
%I A338938 #16 Nov 22 2020 21:29:14 %S A338938 0,2,3,5,7,11,13,17,4,8,16,19,23,29,31,37,41,43,47,53,56,59,61,67,71, %T A338938 73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163, %U A338938 167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257 %N A338938 a(1)=0. For n >= 2, let S be the sum of all nonprime digits in a(1), a(2), ... a(n-1) and let P be the next prime not already in the sequence. If S is a nonprime number less than P and not already in the sequence, a(n) = S. Otherwise, a(n) = P. %C A338938 Similar to A338925, however this sequence does not include the nonprime digits of a(n) itself. %C A338938 Each nonprime term is the sum of all nonprime digits of each previous term. %e A338938 a(9) = 4 since the sum of the nonprime digits of the previous terms is 1+1+1+1 = 4 and 4 is less than the next prime, 19. %e A338938 a(10) = 8 since the sum of nonprime digits of the previous terms is 1+1+1+1+4 = 8 and 8 is less than the next prime, 19. %e A338938 a(11) = 16 since the sum of the nonprime digits of the previous terms is 1+1+1+1+4+8 = 16 and 16 is less than the next prime, 19. %e A338938 Now, the sum of the nonprime digits of the previous terms is 1+1+1+1+4+8+1+6 = 23 (a prime number). So a(12) is the next prime number in that hasn't appeared, meaning a(12) = 19. %o A338938 (PARI) my(v=[0], w=[0], n=1, p=1, m, c); while(n<125, q=vecsum(w);m=[];p=nextprime(p);c=0; for(k=1,#digits(q),if(!isprime(digits(q)[k]),m=concat(m,digits(q)[k])));if(!isprime(q)&&(q<p)&& !vecsearch(vecsort(v),q),v=concat(v,q); w=concat(w,m); c++); if(c==0,for(j=1,#digits(p),if(!isprime(digits(p)[j]),w=concat(w,digits(p)[j]))); v=concat(v,p);p++);n++);v %Y A338938 Cf. A338925. %K A338938 nonn,base %O A338938 1,2 %A A338938 _Eric Angelini_ and _Derek Orr_, Nov 16 2020