login
Numbers n such that antisigma(n) is palindromic.
0

%I #17 Jul 07 2015 08:08:01

%S 1,2,3,4,5,6,13,23,30,31,36,109,119,158,351,1645,1653,2003,3476,3520,

%T 3934,4913,8037,9379,35324,36516,91951,128955,200003,390066,402603,

%U 1068869,2000003,2144992,2467458,2867828,3392245,3607663

%N Numbers n such that antisigma(n) is palindromic.

%C Primes of the form 2*10^k+3 belong the sequence (see A177134 and A081677).

%e antisigma(1) = 1*2/2 - sigma(1) = 1 - 1 = 0;

%e antisigma(13) = 13*14/2 - sigma(13) = 91 - 14 = 77;

%e antisigma(109) = 109*110/2 - sigma(109) = 5995 - 110 = 5885.

%p with(numtheory): T:=proc(w) local x, y, z; x:=w; y:=0;

%p for z from 1 to ilog10(x)+1 do y:=10*y+(x mod 10); x:=trunc(x/10);

%p od; y; end: P:=proc(q) local a,n;

%p for n from 1 to q do a:=n*(n+1)/2-sigma(n); if a=T(a) then print(n);

%p fi; od; end: P(10^9);

%t palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Select[Range@ 4000000, palQ[# (# + 1)/2 - DivisorSigma[1, #]] &] (* _Michael De Vlieger_, Jul 01 2015 *)

%o (PARI) isok(n) = my(d = digits(n*(n+1)/2 - sigma(n))); Vecrev(d)==d; \\ _Michel Marcus_, Jul 01 2015

%Y Cf. A024816, A028980, A081677.

%K nonn,base,easy

%O 1,2

%A _Paolo P. Lava_, Jun 30 2015