|
|
A165932
|
|
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.
|
|
2
|
|
|
22, 33, 44, 55, 66, 77, 88, 99, 111, 121, 141, 171, 181, 191, 222, 232, 242, 282, 292, 313, 323, 333, 343, 353, 373, 414, 444, 454, 464, 484, 494, 505, 545, 555, 565, 575, 595, 616, 626, 646, 656, 666, 676, 686, 717, 727, 737, 757, 767, 787, 797, 818, 828
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|