OFFSET
1,1
COMMENTS
From table page 4 ff of Goins. The semiprime 9986831781362631871386899 = 2048903657 * 4874232005610907 is the largest of the 203 positive integers N such that for some integer d => 2 this number is a d-digit palindrome base 10 as well as a d-digit palindrome for some base b different from 10. Curiously, the smallest such integer, 22, and the number of solutions 203 = 7 * 29, are also semiprimes.
a(203) = 9986831781362631871386899 is the last term in the sequence.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..203
Edray Herber Goins, Palindromes in Different Bases: A Conjecture of J. Ernest Wilkins, arXiv:0909.5452 [math.NT], Sep 29, 2009.
Edray Herber Goins, Palindromes in different bases: a conjecture of J. Ernest Wilkins, Integers, Vol. 9 (2009), A55.
MATHEMATICA
palQ[n_Integer, base_Integer] := Module[{idn = IntegerDigits[n, base]}, idn == Reverse@ idn]; gen[n_] := Block[{id = IntegerDigits@ n, insert = {{}, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}}}, FromDigits@ Join[id, #, Reverse@ id] & /@ insert]; fQ[n_] := Block[{e = Floor@ Log10@ n + 1}, lmtl = Ceiling[n^(1/e)]; lmth = Floor[n^(1/(e - 1))]; palQ[n, 10] && Count[Table[palQ[n, i], {i, lmtl, lmth}], True] > 1]; k = 1; lst = {}; While[k < 10^5, a = Select[gen@k, fQ]; If[a != {}, AppendTo[lst, a]; Print@ a; lst = Sort@ Flatten@ lst]; k++ ]
PROG
(PARI) isok2(k, b) = my(d=digits(k, b)); if ((#d >=2) && (Vecrev(d)==d), return (#d));
isok(k) = my(n); if (n=isok2(k, 10), for (b=2, sqrtnint(k, n-1), if ((b != 10) && (n==isok2(k, b)), return(1)); ); ); \\ Michel Marcus, Aug 03 2022
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Jonathan Vos Post, Sep 30 2009
STATUS
approved