A380340 a(n) = phi(1 + phi(2 + phi(3 + ... phi(n)))).
1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1
Links
- Luis Palacios Vela and Christian Wolird, The Forestry of Adversarial Totient Iterations, arXiv:2501.10616 [math.NT], 2025.
- Index entries for linear recurrences with constant coefficients, signature (1).
Programs
-
Mathematica
PadRight[{1, 1, 2, 2}, 100, 4] (* Paolo Xausa, Jan 22 2025 *)
-
PARI
a(n) = my(x=0); forstep(k=n, 1, -1, x = eulerphi(x+k)); x;
-
Python
from functools import reduce from sympy import totient def A380340(n): return reduce(lambda x,y:totient(x)+y,range(n,-1,-1)) # Chai Wah Wu, Jan 22 2025
Formula
a(n) = 4 for n >= 5 (see Vela and Wolird). - Paolo Xausa, Jan 22 2025
G.f.: x*(2*x^4+x^2+1)/(1-x). - Alois P. Heinz, Jan 22 2025