OFFSET
0,2
COMMENTS
REFERENCES
Michael Trott, The Mathematica GuideBook for Programming, Springer, 2004, page 218.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 0..91
EXAMPLE
1 has no palindromic representation in bases 2 to n.
3 = 11_2.
5 = 101_2, 11_4.
10 = 101_3, 22_4, 11_9.
21 = 10101_2, 111_4, 33_6, 11_20.
36960 = 5775_19, 3(90)3_97, (176)(176)_209, (168)(168)_219,
(165)(165)_223, (160)(160)_230, (154)(154)_239, (140)(140)_263, (132)(132)_279,
(120)(120)_307, (112)(112)_329, (110)(110)_335, (105)(105)_351, (96)(96)_384,
(88)(88)_419, (84)(84)_439, (80)(80)_461, (77)(77)_479, (70)(70)_527,
(66)(66)_559, (60)(60)_615, (56)(56)_659, (55)(55)_671, (48)(48)_769,
(44)(44)_839, (42)(42)_879, (40)(40)_923, (35)(35)_1055, (33)(33)_1119,
(32)(32)_1154, (30)(30)_1231, (28)(28)_1319, (24)(24)_1539, (22)(22)_1679,
(21)(21)_1759, (20)(20)_1847, (16)(16)_2309, (15)(15)_2463, (14)(14)_2639,
(12)(12)_3079, (11)(11)_3359, (10)(10)_3695, 88_4619, 77_5279, 66_6159, 55_7391,
44_9239, 33_12319, 22_18479, 11_36959.
MATHEMATICA
f[n_] := Block[{s = Floor@ Sqrt[n + 1] - 1, b = 2, c = If[IntegerQ@ Sqrt[n + 1], -2, -1]}, While[b < s + 2, idn = IntegerDigits[n, b]; If[ idn == Reverse@ idn, c++]; b++]; c + Count[ Mod[n, Range@ s], 0]]; f[n_] := 0 /; n < 3;
k = 0; mx = -1; lst = {}; While[ k < 360000001, c = f@ k; If[ c > mx, AppendTo[lst, k]; mx = c]; k++]; lst
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michael Trott (mtrott(AT)wolfram.com) and Robert G. Wilson v, May 12 2005
STATUS
approved