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.

A338923 Every even term k of the sequence is the cumulative sum of the even digits used so far (the digits of k are included in the sum).

This page as a plain text file.
%I A338923 #17 Nov 23 2020 03:48:45
%S A338923 0,1,2,3,5,7,9,11,13,15,17,19,21,23,25,27,10,12,29,31,33,35,37,39,41,
%T A338923 20,43,45,47,49,40,51,53,55,57,59,61,63,65,67,69,70,71,72,73,75,77,79,
%U A338923 80,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,130
%N A338923 Every even term k of the sequence is the cumulative sum of the even digits used so far (the digits of k are included in the sum).
%C A338923 This is the lexicographically earliest sequence of distinct nonnegative terms with this property.
%H A338923 Carole Dubois, <a href="/A338923/b338923.txt">Table of n, a(n) for n = 1..5000</a>
%e A338923 a(1) = 0 as 0 is the sum of all even digits used so far:
%e A338923 a(2) = 1 as 1 is the smallest term not yet present in the sequence that doesn't lead to a contradiction;
%e A338923 a(3) = 2 as 2 is the sum of all even digits used so far (0 + 2);
%e A338923 a(4) = 3 as 3 is the smallest term not yet present in the sequence that doesn't lead to a contradiction;
%e A338923 ...
%e A338923 a(17) = 10 as 10 is the sum of all even digits used so far (0 + 2 + 2 + 2 + 2 + 2 + 0);
%e A338923 a(18) = 12 as 12 is the sum of all even digits used so far (0 + 2 + 2 + 2 + 2 + 2 + 0 + 2);
%e A338923 a(19) = 29 as 29 is the smallest term not yet present in the sequence that doesn't lead to a contradiction; etc.
%o A338923 (PARI) my(v=[], S=0,p=1, n=1);while(n<100, c=0;for(q=S, p, if(!(q%2), m=0;for(i=1,#digits(q),if(!(digits(q)[i]%2),m+=digits(q)[i]));if(S+m==q&&!vecsearch(vecsort(v), q),v=concat(v, q);  S+=m; c++; break))); if(c==0, for(j=1,#digits(p),if(!(digits(p)[j]%2),S+=digits(p)[j])); v=concat(v, p); p+=2); n++); v \\ _Derek Orr_, Nov 22 2020
%Y A338923 Cf. A338922, A338924 and A338925 (variants on the same idea).
%K A338923 base,nonn
%O A338923 1,3
%A A338923 _Eric Angelini_ and _Carole Dubois_, Nov 15 2020