login

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”).

A286583
a(n) = A007814(A048673(n)).
6
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, 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, 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
OFFSET
1,5
LINKS
FORMULA
a(n) = A007814(A048673(n)).
PROG
(PARI)
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
A048673(n) = (A003961(n)+1)/2;
A007814(n) = (valuation(n, 2));
(Scheme) (define (A286583 n) (A007814 (A048673 n)))
(Python)
from sympy import factorint, nextprime, prod
def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
def a048673(n):
f = factorint(n)
return 1 if n==1 else (1 + prod(nextprime(i)**f[i] for i in f))//2
def a(n): return a007814(a048673(n)) # Indranil Ghosh, Jun 12 2017
CROSSREFS
Cf. A246261 (positions of zeros), A246263 (of nonzeros).
Sequence in context: A171996 A175669 A288839 * A321931 A321934 A004579
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 31 2017
STATUS
approved