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 A334872 #9 Jun 09 2020 22:11:59 %S A334872 0,0,0,0,0,1,0,1,0,1,0,2,0,1,2,0,0,1,0,4,2,1,0,3,0,1,2,8,0,3,0,1,2,1, %T A334872 4,2,0,1,2,5,0,3,0,16,4,1,0,2,0,1,2,32,0,3,4,9,2,1,0,6,0,1,8,2,4,3,0, %U A334872 64,2,5,0,3,0,1,2,128,8,3,0,4,0,1,0,10,4,1,2,17,0,5,8,256,2,1,4,3,0,1,16,2,0,3,0,33,6 %N A334872 Number of steps needed to reach either 1 or one of the "Fermi-Dirac primes" (A050376) when starting from n and iterating with A334870. %H A334872 Antti Karttunen, <a href="/A334872/b334872.txt">Table of n, a(n) for n = 1..16384</a> %F A334872 If n = 1 or A302777(n) = 1, a(n) = 0, otherwise a(n) = 1 + a(A334870(n)). %F A334872 For all n >= 1, a(n) <= A334871(n). %o A334872 (PARI) %o A334872 A209229(n) = (n && !bitand(n,n-1)); %o A334872 A302777(n) = A209229(isprimepower(n)); %o A334872 A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m)); %o A334872 A334872(n) = { my(s=0); while(n>1 && !A302777(n), s++; n = A334870(n)); (s); }; %o A334872 (PARI) %o A334872 \\ Much faster, A302777 like in above: %o A334872 A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; %o A334872 A052126(n) = if(1==n,n,(n/vecmax(factor(n)[, 1]))); %o A334872 A334872(n) = { my(s=0); while(n>1 && !A302777(n), if(issquarefree(n), return(s+A048675(A052126(n)))); if(issquare(n), s++; n = sqrtint(n), s += A048675(core(n)); n /= core(n))); (s); }; %Y A334872 Cf. A050376 (positions of zeros after 1), A302777, A334859, A334865, A334870, A334871. %K A334872 nonn %O A334872 1,12 %A A334872 _Antti Karttunen_, Jun 08 2020