login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A032452
Irregular triangle read by rows: row n >= 1 contains the sequence p(n), s(p(n)), p(s(p(n))), p(p(s(p(n)))), s(p(p(s(p(n))))), ..., repeatedly applying (p,s,p) to n, where p = phi (A000010), s = sigma = (A000203), stopping after the first 1 is reached. If 1 is never reached, row n contains -1.
5
1, 1, 2, 3, 2, 1, 2, 3, 2, 1, 4, 7, 6, 2, 3, 2, 1, 2, 3, 2, 1, 6, 12, 4, 2, 3, 2, 1, 4, 7, 6, 2, 3, 2, 1, 6, 12, 4, 2, 3, 2, 1, 4, 7, 6, 2, 3, 2, 1, 10, 18, 6, 2, 3, 2, 1, 4, 7, 6, 2, 3, 2, 1, 12, 28, 12, 4, 7, 6, 2, 3, 2, 1, 6, 12, 4, 2, 3, 2, 1
OFFSET
1,3
COMMENTS
Original definition was "Iterates phi, phi, sigma, phi, phi, sigma, ...".
LINKS
L. Alaoglu and P. Erdős, A conjecture in elementary number theory, Bull. Amer. Math. Soc. 50 (1944), 881-882.
EXAMPLE
Triangle begins:
1,
1,
2, 3, 2, 1,
2, 3, 2, 1,
4, 7, 6, 2, 3, 2, 1,
2, 3, 2, 1,
6, 12, 4, 2, 3, 2, 1,
4, 7, 6, 2, 3, 2, 1,
6, 12, 4, 2, 3, 2, 1,
4, 7, 6, 2, 3, 2, 1,
...
For row n=5, for example, we get (5 -> ) phi(5) = 4 -> sigma(4) = 7 -> phi(7) = 6 -> phi(6) = 2 -> sigma(2) = 3 -> phi(3) = 2 -> phi(2) = 1 (stop).
MAPLE
with(numtheory):
T:= proc(n) local l, m; l:= [][]; m:= n;
do m:= phi(m); l:= l, m; if m=1 then break fi;
m:= sigma(m); l:= l, m; if m=1 then break fi;
m:= phi(m); l:= l, m; if m=1 then break fi
od; l
end:
seq(T(n), n=1..20); # Alois P. Heinz, May 19 2020
MATHEMATICA
f[n_, i_] := If[Mod[i, 3] == 2, DivisorSigma[1, n], EulerPhi[n]]; g[n_] := Module[{i = 1, k = n, s = {}}, While[k > 1 || i == 1, k = f[k, i++]; AppendTo[s, k]; ]; s]; Array[g, 15] // Flatten (* Amiram Eldar, May 10 2020 *)
PROG
(Sage)
N = 10
n = 1
seq = []
while n < N:
a = euler_phi(n)
seq.append(a)
i = 0
while a != 1:
if i%3 == 0:
a = sigma(a)
else:
a = euler_phi(a)
seq.append(a)
i += 1
n += 1
# John Machacek, May 08 2020
CROSSREFS
See A334523, A334725 for other versions.
Sequence in context: A170823 A068073 A324504 * A084199 A277745 A353497
KEYWORD
nonn,tabf
AUTHOR
Ursula Gagelmann (gagelmann(AT)altavista.net), Apr 07 1998
EXTENSIONS
Entry revised by N. J. A. Sloane, May 09 2020. Thanks to Amiram Eldar and John Machacek for reconstructing the lost definition of this sequence.
STATUS
approved