login
A111707
a(n) = Sum_{k = 1..ceiling(w/2)} d(k) * d(w+1-k), where (d(1), ..., d(w)) is the decimal expansion of n.
5
0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0, 8
OFFSET
0,3
LINKS
EXAMPLE
a(12) = 1*2 = 2, a(12345) = 1*5 + 2*4 + 3*3 = 22.
MATHEMATICA
Array[Sum[#1[[k]]*#1[[#2 + 1 - k]], {k, Ceiling[#2/2]}] & @@ {IntegerDigits[#], IntegerLength[#]} &, 82, 0] (* Michael De Vlieger, May 21 2021 *)
PROG
(PARI) a(n) = { my (d=digits(n)); sum (k=1, ceil(#d/2), d[k]*d[#d+1-k]) } \\ Rémy Sigrist, May 21 2021
CROSSREFS
Cf. A085942.
Sequence in context: A376172 A334832 A169669 * A115300 A085942 A066308
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Aug 22 2005
EXTENSIONS
More terms from Joshua Zucker, May 08 2006
a(0) = 0 prepended and name clarified by Rémy Sigrist, May 21 2021
STATUS
approved