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.

A339403 a(n) is the smallest positive integer such that n*a(n) contains the string n+a(n) in reverse as a substring. If no such number exists then a(n) = -1.

This page as a plain text file.
%I A339403 #24 Jan 23 2021 23:42:09
%S A339403 0,-1,2,24,37,26,34,35,57,9,-1,12,11,45,193,228,28,51,23,44,841,11,27,
%T A339403 18,3,626,5,22,16,46716,56,41,33,32,6,7,21,4,3,24,592,31,7,619,19,13,
%U A339403 38,2,117,5,463,17,34,308,33,36,30,8,31,4,23,21,648,124,921,903,386,395,4,334,755,31,563
%N A339403 a(n) is the smallest positive integer such that n*a(n) contains the string n+a(n) in reverse as a substring. If no such number exists then a(n) = -1.
%C A339403 This is a variation of A339144 where, instead of the n*a(n) containing n+a(n) as a substring, it contains the reverse of the string n+a(n), including any leading zeros.
%C A339403 Based on a search limit of 5x10^9 up to n = 100000 the values of n for which no a(n) is found are n = 10^k, with k>=0, and 17500. A test of 175000 and 1750000 also found no a(n) indicating that all values of the form 17500*10^k may have no term for a(n).
%C A339403 It is found that when n = 200*10^k, with k>=0, the corresponding value for a(n) is significantly larger than neighboring terms. As an example a(20000) = 666843331, which is the largest term up to n = 100000.
%C A339403 Unlike A339144, which contains multiple consecutive terms with the same value of a(n), in this sequence the largest consecutive run of the same a(n) in the first 100000 terms is only two. The first term of these pairs occurs at n = 110, 121, 2717, 4368, 7916, 10100, 11211, 13231, 17271, 44573, 63529.
%H A339403 Scott R. Shannon, <a href="/A339403/b339403.txt">Table of n, a(n) for n = 0..10000</a>
%e A339403 a(3) = 24 as 3*24 = 72 which contains reverse(3+24) = reverse(27) = 72 as a substring.
%e A339403 a(6) = 34 as 6*34 = 204 which contains reverse(6+34) = reverse(40) = 04 as a substring. Note the leading zero is included.
%e A339403 a(29) = 46716 as 29*46716 = 1354764 which contains reverse(29+4671) = reverse(46745) = 54764 as a substring.
%e A339403 a(110) = 11 as 110*11 = 1210 which contains reverse(110+11) = reverse(121) = 121 as a substring. This is the first of two consecutive terms with a(n) = 11.
%e A339403 a(20000) = 666843331 as 20000*666843331 = 13336866620000 which contains reverse(20000+666843331) = reverse(666863331) = 133368666 as a substring. This is the largest value in the first 100000 terms.
%o A339403 (PARI) isok(n, k) = #strsplit(Str(n*k), concat(Vecrev(Str(n+k)))) > 1;
%o A339403 ispt(n) = my(t); ispower(n,,&t) && (t==10);
%o A339403 a(n) = {if ((n==1) || (n==10) || ispt(n), return (-1)); my(k=0); while (! isok(n, k), k++); k;} \\ _Michel Marcus_, Jan 22 2021
%Y A339403 Cf. A339144, A339107, A063427, A063428, A328095, A333923, A332580.
%K A339403 sign,look,base
%O A339403 0,3
%A A339403 _Scott R. Shannon_, Dec 03 2020