

A344543


Lexicographically earliest sequence S of distinct positive terms such that the product of the last k digits of S is even, k being the rightmost digit of a(n).


1



1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

No term ends with zero.


LINKS

Table of n, a(n) for n=1..80.


EXAMPLE

a(7) = 7, k = 7, and the product 1*2*3*4*5*6*7 (= 5040) is even;
a(8) = 8, k = 8, and the product 1*2*3*4*5*6*7*8 (= 40320) is even;
a(9) = 9, k = 9, and the product 1*2*3*4*5*6*7*8*9 (= 362880) is even;
a(10) = 12, k = 2, and the product 1*2 (= 2) is even;
a(11) = 13, k = 3, and the product 1*2*3 (= 6) is even;
a(12) = 14, k = 4, and the product 1*2*3*4 (= 24) is even; etc.


MATHEMATICA

a[1]=1; a[n_]:=a[n]=Block[{t=1}, While[(k=t~Mod~10; k>Length[s=Flatten[IntegerDigits/@Join[Array[a, n1], {t}]]])k<1MemberQ[Array[a, n1], t]OddQ[Times@@(s[[k;; ]])], t++]; t]; Array[a, 80] (* Giorgos Kalogeropoulos, May 10 2022 *)


CROSSREFS

Cf. A344542.
Sequence in context: A343951 A102234 A174908 * A082757 A239089 A032881
Adjacent sequences: A344540 A344541 A344542 * A344544 A344545 A344546


KEYWORD

base,nonn


AUTHOR

Eric Angelini and Carole Dubois, May 30 2021


STATUS

approved



