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!)
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
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
Cf. A344542.
Sequence in context: A343951 A102234 A174908 * A082757 A239089 A032881
KEYWORD
base,nonn
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 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)