login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(1) = 0; thereafter a(2^(2^k)) = 0 for k > 0, and for other even numbers n, a(n) = 1+a(n/2), and for odd numbers n, a(n) = 2*a(A064989(n)).
2

%I #24 Sep 19 2020 03:25:56

%S 0,1,2,0,4,3,8,1,0,5,16,4,32,9,6,0,64,1,128,6,10,17,256,5,0,33,2,10,

%T 512,7,1024,1,18,65,12,2,2048,129,34,7,4096,11,8192,18,8,257,16384,6,

%U 0,1,66,34,32768,3,20,11,130,513,65536,8,131072,1025,12,2,36,19,262144,66,258,13,524288,3,1048576,2049,2,130,24,35,2097152,8,0,4097

%N a(1) = 0; thereafter a(2^(2^k)) = 0 for k > 0, and for other even numbers n, a(n) = 1+a(n/2), and for odd numbers n, a(n) = 2*a(A064989(n)).

%H Antti Karttunen, <a href="/A335426/b335426.txt">Table of n, a(n) for n = 1..8192</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(1) = 0, and then after, a(2^(2^k)) = 0 for k > 0, and for other even numbers n, a(n) = 1+a(n/2), and for odd numbers n, a(n) = 2*a(A064989(n)).

%F a(n) = A335427(A225546(n)).

%F a(A003961(n)) = 2 * a(n).

%o (PARI)

%o A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

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

%o A335426(n) = if(n<=2,n-1, if(!(n%2),if(A209229(n) && A209229(valuation(n,2)),0,1+A335426(n/2)), 2*A335426(A064989(n))));

%o \\ Alternatively:

%o A335426(n) = if(1==n,0, my(e=isprimepower(n)); if(e>1 && A209229(e), 0, if(!(n%2),1+A335426(n/2), 2*A335426(A064989(n)))));

%Y Cf. A001146, A003961, A048675, A064989, A209229, A225546, A248663, A335427, A335428.

%Y Cf. A082522 (gives indices of zeros after a(1)=0).

%K nonn

%O 1,3

%A _Antti Karttunen_, Jun 15 2020