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!)
A322823 a(n) = 0 if n is 1 or a Fermi-Dirac prime (A050376), otherwise a(n) = 1 + a(A300840(n)). 3

%I #8 Dec 30 2018 00:05:03

%S 0,0,0,0,0,1,0,1,0,1,0,2,0,1,2,0,0,1,0,3,2,1,0,2,0,1,2,3,0,2,0,1,2,1,

%T 4,3,0,1,2,3,0,2,0,3,4,1,0,2,0,1,2,3,0,2,4,3,2,1,0,3,0,1,5,3,4,2,0,3,

%U 2,4,0,3,0,1,2,3,5,2,0,4,0,1,0,3,4,1,2,3,0,4,5,3,2,1,4,2,0,1,6,3,0,2,0,3,4

%N a(n) = 0 if n is 1 or a Fermi-Dirac prime (A050376), otherwise a(n) = 1 + a(A300840(n)).

%C For n > 1, a(n) gives the number of edges needed to traverse from n to reach the leftmost branch (where the terms of A050376 are located) in the binary tree illustrated in A052330.

%H Antti Karttunen, <a href="/A322823/b322823.txt">Table of n, a(n) for n = 1..65537</a>

%F a(1) = 0; for n > 1, if A302777(n) == 1, a(n) = 0, otherwise a(n) = 1 + a(A300840(n)).

%o (PARI)

%o up_to = 10000;

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

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

%o A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };

%o v050376 = A050376list(up_to);

%o A050376(n) = v050376[n];

%o A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };

%o A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };

%o A300840(n) = A052330(A052331(n)>>1);

%o A322823(n) = if((1==n)||(1==A302777(n)),0,1+A322823(A300840(n)));

%Y Cf. A050376, A052330, A052331, A302777, A300840, A322822.

%K nonn

%O 1,12

%A _Antti Karttunen_, Dec 29 2018

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 April 19 10:56 EDT 2024. Contains 371791 sequences. (Running on oeis4.)