OFFSET
1,2
COMMENTS
From Robert Israel, Feb 23 2023: (Start)
LINKS
Robert Israel, Table of n, a(n) for n = 1..6576
MAPLE
ispali:= proc(n) local L;
L:= convert(n, base, 10);
L = ListTools:-Reverse(L)
end proc:
revdigs:= 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 r;
if d::even then [seq](revdigs(r)+10^(d/2)*r, r=10^(d/2-1)..10^(d/2)-1)
else [seq](revdigs(floor(r/10))+10^((d-1)/2)*r, r=10^((d-1)/2)..10^((d+1)/2)-1)
fi
end proc:
[seq(op(select(t -> ispali(3*t+1), palis(d))), d=1..7)]; # Robert Israel, Feb 23 2023
MATHEMATICA
Select[Range[15*10^5], AllTrue[{#, 3#+1}, PalindromeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 14 2018 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 09 2003
EXTENSIONS
Corrected and extended by Ray Chandler, May 21 2003
STATUS
approved