This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A379259 #7 Dec 20 2024 09:24:19 %S A379259 0,0,0,0,1,0,1,0,0,1,2,0,1,1,1,0,1,0,1,1,1,2,3,0,2,1,0,1,2,1,2,0,2,1, %T A379259 1,0,1,1,1,1,2,1,2,2,1,3,4,0,2,2,1,1,2,0,2,1,1,2,3,1,2,2,1,0,1,2,3,1, %U A379259 3,1,2,0,1,1,2,1,2,1,2,1,0,2,3,1,1,2,2 %N A379259 a(n) is the number of iterations that n requires to reach a 3-smooth number under the map x -> phi(x). %C A379259 If k is a 3-smooth number then phi(k) is also a 3-smooth number. Therefore, a(n) counts the numbers that are not 3-smooth numbers in the trajectory from n to a 3-smooth number (including n if it is not a 3-smooth number). %C A379259 The indices of records, 1, 5, 11, 23, 47, ..., seem to be A246491 except for the first term (checked up to A246491(15)). %H A379259 Amiram Eldar, <a href="/A379259/b379259.txt">Table of n, a(n) for n = 1..10000</a> %F A379259 a(A003586(n)) = 0. %e A379259 a(1) = a(2) = a(3) = a(4) = 0 because 1, 2, 3 and 4 are already 3-smooth numbers. %e A379259 a(5) = 1 because after one iteration 5 -> phi(5) = 4, a 3-smooth number, 4, is reached. %e A379259 a(23) = 3 because after 3 iterations 23 -> 22 -> 10 -> 4, a 3-smooth number, 4, is reached. %t A379259 smQ[n_] := n == Times @@ ({2, 3}^IntegerExponent[n, {2, 3}]); a[n_] := -1 + Length@ NestWhileList[EulerPhi, n, ! smQ[#] &]; Array[a, 100] %o A379259 (PARI) issm(n) = my(m = n >> valuation(n, 2)); m == 3^valuation(m, 3); %o A379259 a(n) = {my(c = 0); while(!issm(n), c++; n = eulerphi(n)); c;} %Y A379259 Cf. A000010, A003434, A003586, A086420, A122254, A246491. %K A379259 nonn,easy %O A379259 1,11 %A A379259 _Amiram Eldar_, Dec 19 2024