login
a(n) is the sum of the divisors of A000058(n) (Sylvester's sequence).
2

%I #13 Oct 29 2024 03:57:48

%S 3,4,8,44,1960,3263444,10697794573312,113429214231136770625234912,

%T 12864938683281101589385656009398714729057117020127552,

%U 166504803622354833425112235578181474001920862856209391632362182416351065666575351284563698791731209336320

%N a(n) is the sum of the divisors of A000058(n) (Sylvester's sequence).

%H Amiram Eldar, <a href="/A367131/b367131.txt">Table of n, a(n) for n = 0..10</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Sylvester%27s_sequence#Divisibility_and_factorizations">Sylvester's sequence: Divisibility and factorizations</a>.

%F a(n) = sigma(A000058(n)) = A000203(A000058(n)).

%t a000058[0] = 2; a000058[n_Integer?NonNegative] := a000058[n] = a000058[n - 1]^2 - a000058[n - 1] + 1; a[n_Integer?NonNegative] := a[n] = DivisorSigma[1, a000058[n]]; Table[a[n], {n, 0, 9}] (* _Robert P. P. McKone_, Nov 05 2023 *)

%o (Python)

%o from sympy import divisor_sigma

%o memo = {0: 2}

%o def a000058(n):

%o if n not in memo:

%o memo[n] = a000058(n - 1)**2 - a000058(n - 1) + 1

%o return memo[n]

%o a = lambda n: divisor_sigma(a000058(n))

%o print([a(n) for n in range(10)])

%o # _Robert P. P. McKone_, Nov 05 2023

%Y Cf. A000058, A000203, A091335, A367130.

%K nonn

%O 0,1

%A _Sean A. Irvine_, Nov 05 2023