OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,5).
FORMULA
a(n+1) - a(n) = A056487(floor((n-2)/3)), for n > 2. This works because A056487(n+3) = A056487(n+2)*A056487(n+1)/A056487(n). - Thomas Scheuerle, Oct 26 2022
G.f.: x*(2 + 3*x + 4*x^2 + 5*x^3 + 6*x^4 + 9*x^5 + 2*x^6)/(1 - 5*x^6). - Andrew Howroyd, Nov 23 2025
EXAMPLE
a(1) = 2.
a(2) = 3. The only proper divisor of 2 is 1; 2 + 1 = 3.
a(3) = 4. The only proper divisor of 3 is 1; 3 + 1 = 4.
...
a(8) = 15.
a(9) = 20. Proper divisors of 15 are 1, 3, 5; largest odd proper divisor = 5; 15 + 5 = 20.
PROG
(Python)
a_n = 2
result = [2]
for n in range(30):
temp = []
for i in range(1, a_n):
if a_n % i == 0:
if (i % 2 != 0) and (i != a_n):
temp.append(i)
result.append(a_n + max(temp))
a_n = a_n + max(temp)
print(result)
(PARI) f(n) = my(x=if(n==1, 1, n/factor(n)[1, 1])); x >> valuation(x, 2); \\ Michel Marcus, Oct 26 2022
lista(nn) = my(va = vector(nn)); va[1] = 2; for (n=2, nn, va[n] = va[n-1] + f(va[n-1]); ); va; \\ Michel Marcus, Oct 26 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric Angelini and Gavin Lupo, Oct 25 2022
STATUS
approved
