%I #17 Sep 05 2023 12:52:57
%S 2,4,6,8,0,2,4,6,8,11,22,33,44,55,66,77,88,99,0,22,33,44,55,66,77,88,
%T 99,0,11,33,44,55,66,77,88,99,0,11,22,44,55,66,77,88,99,0,11,22,33,55,
%U 66,77,88,99,0,11,22,33,44,66,77,88,99,0,11,22,33,44,55,77,88,99,0,11,22
%N Numbers obtained as the sum mod 10 of corresponding digits of n and its digit reversal.
%C Most of the terms are palindromes except for the case when the most significant digit sum == 0 mod 10.
%H Alois P. Heinz, <a href="/A113603/b113603.txt">Table of n, a(n) for n = 1..10000</a>
%e a(2358) = 0880. Digit reversal of 2358 is 8532 and the corresponding digit sums mod 10 are 8+2 == 0, 5+3 == 8, 5+3 == 8, 8+2 == 0.
%p A113603 := proc(n)
%p dgs := convert(n,base,10) ;
%p dmod10 := [] ;
%p for i from 1 to nops(dgs) do
%p dmod10 := [op(dmod10), (op(i,dgs)+op(-i,dgs)) mod 10 ] ;
%p end do;
%p add( op(i,dmod10)*10^(i-1),i=1..nops(dmod10)) ;
%p end proc:
%p seq(A113603(n),n=1..90) ; # _R. J. Mathar_, Oct 01 2011
%p # second Maple program:
%p a:= n-> (s-> parse(cat(seq(parse(s[i])+parse(s[-i])
%p mod 10, i=1..length(s)))))(""||n):
%p seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 09 2015
%t Table[FromDigits[Mod[Total[#],10]&/@Thread[{IntegerDigits[n],Reverse[IntegerDigits[n]]}]],{n,80}] (* _Harvey P. Dale_, Sep 05 2023 *)
%Y Cf. A113602.
%K base,easy,less,nonn
%O 1,1
%A _Amarnath Murthy_, Nov 09 2005
|