Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #8 Mar 04 2020 18:09:09
%S 0,0,1,0,1,1,2,0,0,1,3,1,2,2,2,0,3,0,4,1,1,3,5,1,0,2,1,2,4,2,6,0,2,3,
%T 3,0,5,4,3,1,6,1,7,3,1,5,8,1,0,0,4,2,7,1,4,2,3,4,9,2,8,6,2,0,1,2,10,3,
%U 4,3,11,0,9,5,1,4,1,3,12,1,0,6,13,1,2,7,5,3,10,1,4,5,5,8,5,1,11,0,3,0,12,4,14,2,2
%N a(1) = 0, and for n > 1, a(n) = a(A332893(n)) + [n == 3 (mod 4)].
%C Starting from x=n, iterate the map x -> A332893(x) which divides even numbers by 2, and for odd n, changes every 4k+1 prime in the prime factorization to 4k+3 prime and vice versa (except 3 --> 2), like in A332819. a(n) counts the numbers of the form 4k+3 encountered until 1 has been reached. The count includes also n itself if it is of the form 4k+3 (A004767).
%C In other words, locate the node which contains n in binary tree A332815 and traverse from that node towards the root, counting all numbers of the form 4k+3 that occur on the path.
%H Antti Karttunen, <a href="/A332898/b332898.txt">Table of n, a(n) for n = 1..65537</a>
%F a(1) = 0, and for n > 1, a(n) = a(A332893(n)) + [n == 3 (mod 4)].
%F a(n) = A000120(A332896(n)).
%o (PARI) A332898(n) = if(1==n,0,A332898(A332893(n)) + (3==(n%4)));
%Y Cf. A000120, A004767, A332815, A332893, A332896, A332897, A332899.
%Y Cf. A028982 (positions of zeros).
%Y Cf. also A292377.
%K nonn
%O 1,7
%A _Antti Karttunen_, Mar 04 2020