OFFSET
1,2
EXAMPLE
antisigma(1) = 1*2/2 - sigma(1) = 1 - 1 = 0;
antisigma(13) = 13*14/2 - sigma(13) = 91 - 14 = 77;
antisigma(109) = 109*110/2 - sigma(109) = 5995 - 110 = 5885.
MAPLE
with(numtheory): T:=proc(w) local x, y, z; x:=w; y:=0;
for z from 1 to ilog10(x)+1 do y:=10*y+(x mod 10); x:=trunc(x/10);
od; y; end: P:=proc(q) local a, n;
for n from 1 to q do a:=n*(n+1)/2-sigma(n); if a=T(a) then print(n);
fi; od; end: P(10^9);
MATHEMATICA
palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Select[Range@ 4000000, palQ[# (# + 1)/2 - DivisorSigma[1, #]] &] (* Michael De Vlieger, Jul 01 2015 *)
PROG
(PARI) isok(n) = my(d = digits(n*(n+1)/2 - sigma(n))); Vecrev(d)==d; \\ Michel Marcus, Jul 01 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Jun 30 2015
STATUS
approved