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!)
A344545 Lexicographically earliest sequence S of distinct nonnegative terms such that the sum of the last k digits of S is even, k being the leftmost digit of a(n). 0
0, 2, 20, 4, 6, 21, 3, 8, 22, 5, 7, 40, 9, 30, 23, 31, 50, 24, 25, 32, 26, 27, 33, 51, 70, 28, 29, 34, 35, 41, 36, 37, 42, 60, 43, 38, 39, 44, 61, 52, 45, 71, 53, 72, 46, 47, 54, 48, 49, 55, 56, 57, 58, 59, 62, 63, 64, 73, 74, 75, 65, 300, 66, 80, 67, 76, 68, 69, 90, 81, 77, 91, 78, 79, 82, 83, 301, 302, 84 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(1) = 0, k = 0, and the sum 0 is even;
a(2) = 2, k = 2, and the sum 0 + 2 (= 2) is even;
a(3) = 20, k = 2, and the sum 2 + 2 (= 4) is even;
a(4) = 4, k = 4, and the sum 2 + 2 + 0 + 4 (= 8) is even;
a(5) = 6, k = 6, and the sum 0 + 2 + 2 + 0 + 4 + 6 (= 14) is even;
a(6) = 21, k = 2, and the sum 6 + 2 (= 8) is even; etc.
MATHEMATICA
a[1]=0; a[n_]:=a[n]=Block[{k=1}, While[(p=First@IntegerDigits@k; p>Length[s=Flatten[IntegerDigits/@Join[Array[a, n-1], {p}]]])||MemberQ[Array[a, n-1], k]||!EvenQ@Total[s[[-p;; ]]], k++]; k]; Array[a, 79] (* Giorgos Kalogeropoulos, May 09 2022 *)
CROSSREFS
Cf. A344540.
Sequence in context: A342077 A077339 A077341 * A076495 A308387 A058403
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Carole Dubois, May 30 2021
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 25 14:08 EDT 2024. Contains 371989 sequences. (Running on oeis4.)