%I #12 Jan 01 2021 12:16:59
%S 3,2,4,6,8,10,12,14,16,18,20,9,22,24,26,28,19,21,30,32,34,36,38,40,42,
%T 43,44,46,48,50,52,54,63,73,56,58,60,62,64,66,68,70,72,101,74,76,78,
%U 80,82,84,86,88,90,92,94,96,98,100,102,131,104,106,108,110,112,114,116,118,120,122,124,141,126,128,153
%N Every odd term k of the sequence is the cumulative sum of the prime digits used so far (the digits of k are included in the sum).
%C This is the lexicographically earliest sequence of distinct positive terms with this property. The prime digits are 2, 3, 5 and 7.
%C The sequence is first extended with the smallest odd term not leading to a contradiction; if no such term exists, the sequence is extended with the smallest even term not yet present.
%e Not a(1) = 1 as this 1, being odd, should be the sum of the prime digits so far -- which is wrong (there are none);
%e not a(1) = 2 as a(1) = 3 is odd and possible here;
%e a(12) = 9 as 9 is odd and the sum of the prime digits 3 + 2 + 2 + 2;
%e a(13) = 22 as 22 is the smallest even term available;
%e a(17) = 19 as 19 = 3 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2;
%e a(18) = 21 as 21 is the sum of 19 + 2 (the first digit of 21 itself); etc.
%o (Python)
%o def pds(k): return sum(int(d) for d in str(k) if d in "2357")
%o def aupto(nn):
%o aset, alst, primesum, nexteven = set(), [], 0, 2
%o for n in range(1, nn):
%o k = 1
%o found = False
%o while not found:
%o while k in aset: k += 2
%o if k == primesum + pds(k): found = True; break
%o if k > primesum + 7 * len(str(k)): break
%o k += 2
%o if found: ak = k
%o else: ak = nexteven; nexteven += 2
%o aset.add(ak); alst.append(ak); primesum += pds(ak)
%o return alst
%o print(aupto(76)) # _Michael S. Branicky_, Dec 29 2020
%Y CF. A338924
%K base,nonn
%O 1,1
%A _Eric Angelini_ and _Carole Dubois_, Dec 28 2020