A082588 a(1) = 1, a(n) = Sum_{d | n and d < n} a(d)^2 for n > 1.
1, 1, 1, 2, 1, 3, 1, 6, 2, 3, 1, 16, 1, 3, 3, 42, 1, 16, 1, 16, 3, 3, 1, 308, 2, 3, 6, 16, 1, 31, 1, 1806, 3, 3, 3, 532, 1, 3, 3, 308, 1, 31, 1, 16, 16, 3, 1, 96936, 2, 16, 3, 16, 1, 308, 3, 308, 3, 3, 1, 1508, 1, 3, 16, 3263442, 3, 31, 1, 16, 3, 31, 1, 378456
Offset: 1
Keywords
Examples
a(12) = a(1)^2 + a(2)^2 + a(3)^2 + a(4)^2 + a(6)^2 = 1^2 + 1^2 + 1^2 + 2^2 + 3^2 = 1 + 1 + 1 + 4 + 9 = 16.
Links
- Andrey Zabolotskiy, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[ n_] := If[ n < 2, Boole[n == 1], Sum[ a[d]^2, {d, Drop[Divisors @ n, -1]}]]; (* Michael Somos, May 19 2018 *)
-
PARI
a(n) = if (n==1, 1, sumdiv(n, d, if (d
Michel Marcus, Jan 30 2017 -
Python
a = [1] for n in range(2, 10001): a.append(sum(a[d-1]**2 for d in range(1, n) if n%d == 0)) print(a) # Andrey Zabolotskiy, Jan 30 2017
Formula
a(p^(n+1)) = A007018(n) if p is a prime. - Michael Somos, May 19 2018
Extensions
Typo in data corrected by Andrey Zabolotskiy, Jan 30 2017
Comments