%I #23 Jun 13 2015 00:53:38
%S 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,
%T 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,
%U 0,38,0,4,9,4,25,13,0,4,9,29,0,13,0,4,34,4,0,13,0
%N Sum of squares d^2 of distinct divisors of n, d in {2, 3, 5}.
%C 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.
%C A generalization: let B={b_1,...,b_t} be a set of t positive (not necessarily distinct) integers and m>=0 an integer.
%C 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
%C A(b_i),A(b_i+b_j),A(b_i+b_j+b_k),...,
%C A(b_1+...+b_t), for the other values of A(n) we have the recursion:
%C A(n)=Sum{1<=i<=t}A(n-b_i)- Sum{1<=i<j<=t}A(n-b_i-b_j)+...+((-1)^(t-1))*A(n-b_1-...-b_t), where we put A(n)=0, if n<0. Such sequence is lcm(b_1,...,b_t)-periodic.
%H V. Shevelev, <a href="http://arXiv.org/abs/0903.1743">A recursion for divisor function over divisors belonging to a prescribed finite sequence of positive integers and a solution of the Lahiri problem for divisor function sigma_x(n)</a>, arXiv:0903.1743
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-2,-1,0,1,2,2,1)
%F a(n)= a(n-2) +a(n-3) -a(n-7)- a(n-8) +a(n-10), n>10.
%F By the comment, up to 10 it is sufficient to
%F calculate directly only values a(2)=4, a(3)=9, a(5)=25, a(7)=0, a(8)=4, a(10)=29.
%F 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,
%F a(9)=a(7)+a(6)-a(2)-a(1)=0+13-4+0=9.
%F 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
%F 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
%Y Cf. A005063, A098002, A178142-A178144, A178146.
%K nonn,easy,less
%O 1,2
%A _Vladimir Shevelev_, May 21 2010, May 23 2010