OFFSET
0,3
COMMENTS
a(n) = sum of the products of r-th most significant digit and the r-th least significant digit, the sum being taken over all the digits of n.
If the number of digits in n is even then a(n) is also even.
a(36) = 36.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
EXAMPLE
a(4) = 4*4 = 16.
a(123) = 10: 123
............ 321 (1*3 +2*2 +3*1 = 10).
a(1203) = 1*3 + 2*0 + 0*2 +3*1 = 6.
a(1234) = 1*4 +2*3 + 3*2 +4*1 = 20.
MATHEMATICA
dr[n_]:=Module[{idn=IntegerDigits[n]}, Total[Times@@@Transpose[Join[{idn, Reverse[idn]}]]]]; Array[dr, 80] (* Harvey P. Dale, May 03 2011 *)
PROG
(PARI) a(n) = { my (d=digits(n)); d*Colrev(d) } \\ Rémy Sigrist, May 21 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 14 2003
EXTENSIONS
More terms from David Wasserman, Feb 14 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 31 2007
a(0) = 0 prepended by Rémy Sigrist, May 21 2021
STATUS
approved