cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A347402 Lexicographically earliest sequence of distinct terms > 0 such that the product n * a(n) forms a palindrome in base 10.

This page as a plain text file.
%I A347402 #22 May 07 2022 10:10:27
%S A347402 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 A347402 26,703,31,8,0,28,66,47,121,15,77,6,13,154,0,187,143,277,48,1129,99,
%U A347402 33,44,239,0,291,406,132,518,91,377,303,364,219,0,442,386,287,333,777
%N A347402 Lexicographically earliest sequence of distinct terms > 0 such that the product n * a(n) forms a palindrome in base 10.
%C A347402 When n ends with a zero, we have a(n) = 0 in the sequence.
%H A347402 Chai Wah Wu, <a href="/A347402/b347402.txt">Table of n, a(n) for n = 1..10000</a>
%e A347402 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 A347402 for n = 8 we have a(8) = 29 and 8 * 29 = 232 is a palindrome in base 10;
%e A347402 for n = 9 we have a(9) = 19 and 9 * 19 = 171 is a palindrome in base 10;
%e A347402 for n = 10 we have a(10) = 0 and 10 * 0 = 0 is a palindrome in base 10;
%e A347402 for n = 11 we have a(11) = 4 and 11 * 4 = 44 is a palindrome in base 10; etc.
%t A347402 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 A347402 (Python)
%o A347402 def ispal(n): s = str(n); return s == s[::-1]
%o A347402 def aupton(terms):
%o A347402     alst, seen = [1], {1}
%o A347402     for n in range(2, terms+1):
%o A347402         if n%10 == 0: alst.append(0); continue
%o A347402         an = 1
%o A347402         while an in seen or not ispal(n * an): an += 1
%o A347402         alst.append(an); seen.add(an)
%o A347402     return alst
%o A347402 print(aupton(100)) # _Michael S. Branicky_, Aug 30 2021
%Y A347402 Cf. A050782, A347335, A347336, A347400, A347401.
%K A347402 base,nonn
%O A347402 1,2
%A A347402 _Eric Angelini_ and _Carole Dubois_, Aug 30 2021