OFFSET
1,1
COMMENTS
Contains 5*(10^k+1) for k>=1. - Robert Israel, Jul 12 2019
LINKS
EXAMPLE
55 = k + reverse(k) for k = 14, 23, 32, 41, 50; 1441 = k + reverse(k) for k = 1040, 1130, 1220, 1310, 1400.
MAPLE
N:= 10^5:
revdigs:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
V:= Vector(N):
for x from 1 to N do
v:= x + revdigs(x);
if v <= N then V[v]:= V[v]+1 fi;
od:
select(t -> V[t]=5, [$1..N]); # Robert Israel, Jul 12 2019
PROG
(ARIBAS) var n, k, c, i, rev: integer; st, nst: string; end; m := 5; for n := 0 to 24600 do k := n div 2; c := 0; while k <= n and c < m + 1 do st := itoa(k); nst := ""; for i := 0 to length(st) - 1 do nst := concat(st[i], nst); end; rev := atoi(nst); if n = k + rev then inc(c); if k mod 10 <> 0 and k <> rev then inc(c); end; end; inc(k); end; if c = m then write(n, ", "); end; end;
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Klaus Brockhaus, Jun 17 2002
STATUS
approved