cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Aug 22 2005

Keywords

Examples

			a(12) = 1*2 = 2, a(12345) = 1*5 + 2*4 + 3*3 = 22.
		

Crossrefs

Cf. A085942.

Programs

  • Mathematica
    Array[Sum[#1[[k]]*#1[[#2 + 1 - k]], {k, Ceiling[#2/2]}] & @@ {IntegerDigits[#], IntegerLength[#]} &, 82, 0] (* Michael De Vlieger, May 21 2021 *)
  • 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

Extensions

More terms from Joshua Zucker, May 08 2006
a(0) = 0 prepended and name clarified by Rémy Sigrist, May 21 2021