login
Sum of digits of n equals sum of digits of its antisigma (A024816).
1

%I #7 Jun 04 2013 13:09:59

%S 24,46,69,78,145,147,169,177,186,198,451,459,460,474,478,495,568,586,

%T 588,618,639,667,685,738,801,838,864,865,987,1194,1198,1485,1486,1495,

%U 1558,1566,1639,1698,1738,1878,1954,1959,2295,2458,2494,2538,2584,2655,2656

%N Sum of digits of n equals sum of digits of its antisigma (A024816).

%H Paolo P. Lava, <a href="/A226327/b226327.txt">Table of n, a(n) for n = 1..1000</a>

%e For 2584 we have antisigma(2584) = 2584*(2584 + 1)/2 - sigma(2584) = 3334420 and 2 + 5 + 8 + 4 = 3 + 3 + 3 + 4 + 4 + 2 + 0 = 19.

%p with(numtheory); SA:=proc(t) global v,z; v:=0; z:=t;

%p while z>0 do v:=v+(z mod 10); z:=trunc(z/10); od; v; end:

%p A226327:=proc(q) local n; for n from 1 to q do

%p if SA(n)=SA(n*(n+1)/2-sigma(n)) then print(n);

%p fi; od; end: A226327(10^4);

%Y Cf. A024816, A067343.

%K nonn,base

%O 1,1

%A _Paolo P. Lava_, Jun 04 2013