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.

A178147 Sum of squares d^2 of distinct divisors of n, d in {2, 3, 5}.

Original entry on oeis.org

0, 4, 9, 4, 25, 13, 0, 4, 9, 29, 0, 13, 0, 4, 34, 4, 0, 13, 0, 29, 9, 4, 0, 13, 25, 4, 9, 4, 0, 38, 0, 4, 9, 4, 25, 13, 0, 4, 9, 29, 0, 13, 0, 4, 34, 4, 0, 13, 0, 29, 9, 4, 0, 13, 25, 4, 9, 4, 0, 38, 0, 4, 9, 4, 25, 13, 0, 4, 9, 29, 0, 13, 0, 4, 34, 4, 0, 13, 0
Offset: 1

Views

Author

Vladimir Shevelev, May 21 2010, May 23 2010

Keywords

Comments

The sequence is periodic with period {0 4 9 4 25 13 0 4 9 29 0 13 0 4 34 4 0 13 0 29 9 4 0 13 25 4 9 4 0 38} of length 30.
A generalization: let B={b_1,...,b_t} be a set of t positive (not necessarily distinct) integers and m>=0 an integer.
For m>=0, let A(n)=Sum d^m over divisors d of n which are elements of B (with the multiplicities as in B). Calculating directly values of
A(b_i),A(b_i+b_j),A(b_i+b_j+b_k),...,
A(b_1+...+b_t), for the other values of A(n) we have the recursion:
A(n)=Sum{1<=i<=t}A(n-b_i)- Sum{1<=i

Crossrefs

Formula

a(n)= a(n-2) +a(n-3) -a(n-7)- a(n-8) +a(n-10), n>10.
By the comment, up to 10 it is sufficient to
calculate directly only values a(2)=4, a(3)=9, a(5)=25, a(7)=0, a(8)=4, a(10)=29.
For other n's we can use the recursion, accepting formally a(n)=0 for n<0. So a(1)=0; a(4)=a(2)+a(1)=4;a(6)=a(4)+a(3)=4+9=13,
a(9)=a(7)+a(6)-a(2)-a(1)=0+13-4+0=9.
a(n) = -2*a(n-1) -2*a(n-2) -a(n-3) +a(n-5) +2*a(n-6) +2*a(n-7) +a(n-8). - R. J. Mathar, Jul 13 2010
G.f. -x^2*(4+17*x+30*x^2+55*x^3+80*x^4+38*x^6+76*x^5) / ( (x-1)*(1+x)*(1+x+x^2)*(x^4+x^3+x^2+x+1) ). - R. J. Mathar, Dec 17 2012