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 A338941 #23 May 08 2021 08:30:44 %S A338941 1,4,6,8,9,10,12,2,14,15,16,18,20,11,21,13,22,24,25,26,27,28,30,32,33, %T A338941 34,35,36,38,39,40,42,44,45,46,48,49,50,51,52,54,55,56,57,58,60,62,63, %U A338941 64,65,66,68,69,70,72,74,75,76,77,78,80,81,82,84,85,86,87,88,90 %N A338941 a(1)=1. For n >= 2, let S be the sum of all prime digits in a(1), a(2), ... a(n-1) and let C be the next nonprime number not already in the sequence. If S is a prime less than C and is not already a term of the sequence, a(n) = S. Otherwise, a(n) = C. %C A338941 Similar to A338924, however this sequence does not account for the prime digits of a(n) itself. %C A338941 Each prime term is the sum of all prime digits of each previous term. %e A338941 a(16) = 13 because the sum of the prime digits from the previous terms is 2+2+5+2+2 = 13 (a prime) and 13 is less than the next nonprime (22). %e A338941 a(17) = 22 because the sum of the prime digits from the previous terms is 2+2+5+2+2+3 = 16 (a nonprime), so a(17) is the next nonprime in the sequence. %e A338941 a(18) = 24 because the sum of the prime digits from the previous terms is 2+2+5+2+2+3+2+2 = 20 (a nonprime). %e A338941 a(16) = 25 because the sum of the prime digits from the previous terms is 2+2+5+2+2+3+2+2+2 = 22 (a nonprime). %e A338941 a(17) = 26 because the sum of the prime digits from the previous terms is 2+2+5+2+2+3+2+2+2+2+5 = 29 (a prime) but it is not less than the next nonprime (which is 26). %o A338941 (PARI) a(n)=my(v=[1], S=0, k=1, C=4, m); while(k<n, while(isprime(C), C++); m=vecsum(select(isprime,digits(S))); if(isprime(S) && (S<C) && !vecsearch(vecsort(v),S), v=concat(v,S); S+=m, S+= vecsum(select(isprime,digits(C))); v=concat(v,C);C++); k++); v[#v] %Y A338941 Cf. A338924. %K A338941 nonn,base %O A338941 1,2 %A A338941 _Eric Angelini_ and _Derek Orr_, Nov 17 2020