%I #22 May 07 2022 10:10:27
%S 1,2,3,11,101,37,23,29,19,0,4,21,38,18,35,17,16,14,9,0,12,22,7,88,209,
%T 26,703,31,8,0,28,66,47,121,15,77,6,13,154,0,187,143,277,48,1129,99,
%U 33,44,239,0,291,406,132,518,91,377,303,364,219,0,442,386,287,333,777
%N Lexicographically earliest sequence of distinct terms > 0 such that the product n * a(n) forms a palindrome in base 10.
%C When n ends with a zero, we have a(n) = 0 in the sequence.
%H Chai Wah Wu, <a href="/A347402/b347402.txt">Table of n, a(n) for n = 1..10000</a>
%e For n = 7 we have a(7) = 23 and 7 * 23 = 161 is a palindrome in base 10; indeed, at n=7, multiples 7 * 1 = 7 and 7 * 11 = 77 are palindromes but 1 and 11 have already appeared in the sequence. The next palindrome multiple is 7 * 23 = 161 and 23 has not yet appeared so a(7) = 23;
%e for n = 8 we have a(8) = 29 and 8 * 29 = 232 is a palindrome in base 10;
%e for n = 9 we have a(9) = 19 and 9 * 19 = 171 is a palindrome in base 10;
%e for n = 10 we have a(10) = 0 and 10 * 0 = 0 is a palindrome in base 10;
%e for n = 11 we have a(11) = 4 and 11 * 4 = 44 is a palindrome in base 10; etc.
%t a[1]=1;a[n_]:=a[n]=If[Mod[n,10]==0,0,(k=1;While[!PalindromeQ[n*k]||MemberQ[Array[a,n-1],k],k++];k)];Array[a,65] (* _Giorgos Kalogeropoulos_, May 05 2022 *)
%o (Python)
%o def ispal(n): s = str(n); return s == s[::-1]
%o def aupton(terms):
%o alst, seen = [1], {1}
%o for n in range(2, terms+1):
%o if n%10 == 0: alst.append(0); continue
%o an = 1
%o while an in seen or not ispal(n * an): an += 1
%o alst.append(an); seen.add(an)
%o return alst
%o print(aupton(100)) # _Michael S. Branicky_, Aug 30 2021
%Y Cf. A050782, A347335, A347336, A347400, A347401.
%K base,nonn
%O 1,2
%A _Eric Angelini_ and _Carole Dubois_, Aug 30 2021