OFFSET
1,3
COMMENTS
EXAMPLE
a(7) = 222 is a term because it is a palindrome, is not prime, and its arithmetic derivative 191 is a palindrome.
MAPLE
ader:= proc(n) local t;
n*add(t[2]/t[1], t=ifactors(n)[2])
end proc:
rev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
palis:= proc(d) local x, y;
if d::even then seq(10^(d/2)*x+rev(x), x=10^(d/2-1)..10^(d/2)-1)
else seq(seq(10^((d+1)/2)*x+10^((d-1)/2)*y+rev(x), y=0..9), x=10^((d-3)/2) ..10^((d-1)/2)-1)
fi
end proc:
palis(1):= $0..9:
filter:= proc(n) local d;
if isprime(n) then return false fi;
d:= ader(n);
d = rev(d)
end proc:
select(filter, [seq(palis(i), i=1..7)]);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, May 23 2023
STATUS
approved