A300447 Numbers x such that sigma(x) = sigma(y), with x<>y, where y is the 10's complement mod 10 of the digits of x.
54, 56, 513, 520, 546, 564, 580, 597, 4845, 5130, 5223, 5454, 5656, 5887, 5970, 6265, 44226, 46365, 48450, 50260, 50840, 51300, 52230, 52520, 53768, 57342, 58580, 58870, 59700, 62650, 64745, 66884, 463650, 477972, 484500, 489132, 489632, 493752, 501536, 503274
Offset: 1
Examples
sigma(54) = sigma(56) = 120; sigma(513) = sigma(597) = 800; sigma(477972) = sigma(633138) = 1415232.
Links
- Paolo P. Lava, Table of n, a(n) for n = 1..150
Programs
-
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 *)
-
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