OFFSET
1,2
COMMENTS
No term ends with zero.
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, n-1], {t}]]])||k<1||MemberQ[Array[a, n-1], t]||OddQ[Times@@(s[[-k;; ]])], t++]; t]; Array[a, 80] (* Giorgos Kalogeropoulos, May 10 2022 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, May 30 2021
STATUS
approved