OFFSET
1,4
COMMENTS
a(p) = 1 for p prime.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k|n, k not prime} k^2.
G.f.: Sum_{k>=1} k^2*x^(k+1)/(1 - x^k) - prime(k)^2*x^(prime(k)+1)/(1 - x^prime(k)). - Ilya Gutkovskiy, Jan 01 2017
EXAMPLE
a(12) = 197 because the divisors of 12 are {1, 2, 3, 4, 6, 12}, the subset of nonprime divisors are {1, 4, 6, 12}, and 1^2 + 4^2 + 6^2 + 12^2 = 197.
MAPLE
A189120 := proc(n) local a, d; a := 0 ; for d in numtheory[divisors](n) do if not isprime(d) then a := a+d^2 ; end if; end do: a ; end proc: # R. J. Mathar, Apr 17 2011
MATHEMATICA
Table[Total[Select[Divisors[n], ! PrimeQ[#] &]^2], {n, 50}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Apr 17 2011
STATUS
approved