A380354 a(n) = phi(2 + phi(3 + phi(5 + ... + phi(prime(n))))), where phi is Euler totient function (A000010).
1, 2, 4, 6, 4, 8, 8, 12, 12, 16, 20, 20, 18, 40, 40, 16, 18, 18, 16, 72, 40, 16, 40, 18, 96, 96, 18, 64, 20, 40, 20, 48, 42, 40, 42, 20, 20, 40, 40, 20, 18, 20, 64, 64, 20, 40, 40, 40, 40, 20, 40, 20, 18, 64, 64, 40, 40, 20, 40, 20, 40, 64, 20, 40, 40, 20, 20, 64, 64, 64
Offset: 1
Keywords
Links
- Paolo Xausa, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
A380354[n_] := Fold[EulerPhi[#2 + #] &, 0, Prime[Range[n, 1, -1]]]; Array[A380354, 100]
-
PARI
a(n) = my(x=0); forstep(k=n, 1, -1, x = eulerphi(prime(k)+x)); x; \\ Michel Marcus, Jan 22 2025
-
Python
from functools import reduce from sympy import totient, primerange def A380354(n): return totient(reduce(lambda x,y:totient(x)+y,tuple(reversed(tuple(primerange(prime(n)+1)))))) # Chai Wah Wu, Jan 23 2025
Comments