login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 6

%I #9 Jun 09 2020 22:11:59

%S 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 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 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 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 Antti Karttunen, <a href="/A334872/b334872.txt">Table of n, a(n) for n = 1..16384</a>

%F If n = 1 or A302777(n) = 1, a(n) = 0, otherwise a(n) = 1 + a(A334870(n)).

%F For all n >= 1, a(n) <= A334871(n).

%o (PARI)

%o A209229(n) = (n && !bitand(n,n-1));

%o A302777(n) = A209229(isprimepower(n));

%o 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(n) = { my(s=0); while(n>1 && !A302777(n), s++; n = A334870(n)); (s); };

%o (PARI)

%o \\ Much faster, A302777 like in above:

%o A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };

%o A052126(n) = if(1==n,n,(n/vecmax(factor(n)[, 1])));

%o 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 Cf. A050376 (positions of zeros after 1), A302777, A334859, A334865, A334870, A334871.

%K nonn

%O 1,12

%A _Antti Karttunen_, Jun 08 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 10:08 EDT 2024. Contains 375264 sequences. (Running on oeis4.)