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.

A276959 Sum of squares of digits in all divisors of n.

Original entry on oeis.org

1, 5, 10, 21, 26, 50, 50, 85, 91, 31, 3, 71, 11, 71, 61, 122, 51, 196, 83, 51, 64, 15, 14, 155, 55, 55, 144, 155, 86, 111, 11, 135, 30, 80, 109, 262, 59, 160, 110, 131, 18, 141, 26, 63, 183, 70, 66, 272, 147, 85, 86, 100, 35, 290, 78, 280, 166, 179, 107, 172, 38
Offset: 1

Views

Author

Bhushan Bade, Sep 22 2016

Keywords

Examples

			a(18) = 1^2+2^2+3^2+6^2+9^2+1^2+8^2 = 196 because divisors of 18 are 1,2,3,6,9,18.
a(31) = 1^2+3^2+1^2 = 11 because divisors of 31 are 1,31.
		

Crossrefs

Cf. A003132.

Programs

  • Mathematica
    Table[Total@ Flatten@ Map[#^2 &, IntegerDigits@ Divisors@ n], {n, 61}] (* Michael De Vlieger, Sep 24 2016 *)
  • PARI
    ssd(n) = my(d=digits(n)); sum(k=1, #d, d[k]^2);
    a(n) = sumdiv(n, d, ssd(d)); \\ Michel Marcus, Sep 22 2016

Extensions

More terms from Michel Marcus, Sep 22 2016