OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..150
EXAMPLE
sigma(54) = sigma(56) = 120;
sigma(513) = sigma(597) = 800;
sigma(477972) = sigma(633138) = 1415232.
MAPLE
with(numtheory): P:=proc(q) local a, b, k, n;
for n from 1 to q do a:=convert(n, base, 10);
for k from 1 to nops(a) do a[k]:=(10-a[k]) mod 10; od; b:=0;
for k from 1 to nops(a) do b:=b*10+a[nops(a)-k+1]; od;
if b<>n and sigma(b)=sigma(n) then print(n); fi; od; end: P(10^6);
MATHEMATICA
Select[Range[10^6], Apply[And[#1 != #2, DivisorSigma[1, #1] == DivisorSigma[1, #2]] &, {#, FromDigits[IntegerDigits[#] /. d_?Positive :> 10 - d]}] &] (* Michael De Vlieger, Mar 09 2018 *)
PROG
(PARI) isok(x) = {my(dx = digits(x), dy = vector(#dx, k, (10-dx[k]) % 10), y = fromdigits(dy)); (x != y) && (sigma(x) == sigma(y)); } \\ Michel Marcus, Mar 07 2018
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Mar 06 2018
STATUS
approved