login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338922 Every odd term k of the sequence is the cumulative sum of the odd digits used so far (the digits of k are included in the sum). 4
1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 11, 32, 34, 36, 21, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 71, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This is the lexicographically earliest sequence of distinct positive terms with this property.
LINKS
EXAMPLE
a(1) = 1 as the sum of all odd digits used so far is 1:
a(2) = 2 as 2 is the smallest term not yet present in the sequence that doesn't lead to a contradiction;
a(3) = 4 as a(3) = 3 would be a contradiction and a(3) = 4 doesn't lead to a contradiction;
...
a(17) = 11 as the sum of all odd digits used so far is 11 (1 + 1 + 1 + 1 + 1 + 1 + 3 + 1 + 1); etc.
PROG
(PARI) my(v=[], S=0, p=2, 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
CROSSREFS
Cf. A338923, A338924 and A338925 (variants on the same idea).
Sequence in context: A337718 A246410 A195169 * A055964 A055966 A087113
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Nov 15 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 13:50 EDT 2024. Contains 371780 sequences. (Running on oeis4.)