OFFSET
1,2
COMMENTS
The first term divisible by 3 is a(3)=6.
The first term divisible by 5 is a(13)=240.
The first term divisible by 11 is a(48)=190080.
MAPLE
ispali:= proc(n) local L;
L:= convert(n, base, 10);
evalb(L = ListTools:-Reverse(L))
end proc:
N:= 200000: # for terms <= N
Palis:= select(ispali, {$2..N}):
A338565:= Vector(N):
A338565[1]:= 1:
R:= 1: bestv:= 1:
A[1]:= 1:
for n from 2 to N do
A[n]:= add(A[n/d], d= numtheory:-divisors(n) intersect Palis);
if A[n] > bestv then bestv:= A[n]; R:= R, n
od:
R;
MATHEMATICA
Block[{a, s}, a[n_] := If[n == 1, n, Sum[If[(d < n && PalindromeQ[n/d]), a[d], 0], {d, Divisors[n]}]]; s = Array[a, 10^4]; Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]] ] (* Michael De Vlieger, Nov 15 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Nov 15 2020
STATUS
approved