Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 May 25 2020 03:42:53
%S 0,1,0,0,2,3,1,1,0,0,0,0,0,0,1,0,1,1,2,5,2,2,0,2,0,1,0,1,4,0,0,1,0,0,
%T 0,0,0,0,0,0,1,0,3,0,3,2,0,0,0,1,4,0,1,2,1,0,1,0,0,1,1,3,1,0,2,1,2,1,
%U 0,2,0,1,3,1,0,3,3,7,1,2,0,0,0,3,0,0,1,4,0,0,1,0,0,4,0,5,0,1,0,0,2,0,1,1,0,0,0,0,0,0,0,1,6
%N a(n) = A007814(A048673(n)).
%H Antti Karttunen, <a href="/A286583/b286583.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A007814(A048673(n)).
%o (PARI)
%o A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of _Michel Marcus_
%o A048673(n) = (A003961(n)+1)/2;
%o A007814(n) = (valuation(n,2));
%o A286583(n) = A007814(A048673(n));
%o (Scheme) (define (A286583 n) (A007814 (A048673 n)))
%o (Python)
%o from sympy import factorint, nextprime, prod
%o def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
%o def a048673(n):
%o f = factorint(n)
%o return 1 if n==1 else (1 + prod(nextprime(i)**f[i] for i in f))//2
%o def a(n): return a007814(a048673(n)) # _Indranil Ghosh_, Jun 12 2017
%Y Cf. A007814, A048673, A286582, A286584, A286585.
%Y Cf. A246261 (positions of zeros), A246263 (of nonzeros).
%K nonn
%O 1,5
%A _Antti Karttunen_, May 31 2017