OFFSET
1,2
COMMENTS
See A329893.
LINKS
Mikhail Kurkov, Table of n, a(n) for n = 1..13495
FORMULA
MATHEMATICA
a[n_?EvenQ] := a[n] = -a[n/2]; a[0] = 0; a[n_] := a[n] = a[(n - 1)/2] + 1; DeleteCases[Table[Product[ 1 + a[Floor[n/(2^k)]], {k, 0, Floor[Log2[n]]}], {n, 0, 200}], 0] (* Michael De Vlieger, Apr 22 2024, after Jean-François Alcover at A004718 *)
PROG
(PARI) b(n) = if(n==0, 0, (-1)^(n+1)*b(n\2) + n%2); \\ A004718
f(n) = if(n==0, 1, prod(k=0, logint(n, 2), 1+b(n\2^k)));
lista(nn) = for (n=0, nn, if (f(n), print1(f(n), ", "))); \\ Michel Marcus, May 26 2019
(Python)
from itertools import count, islice
from math import prod
def A325803_gen(): # generator of terms
for n in count(0):
c, s = [0]*(m:=n.bit_length()), bin(n)[2:]
for i in range(m):
if s[i]=='1':
for j in range(m-i):
c[j] = c[j]+1
else:
for j in range(m-i):
c[j] = -c[j]
if (k:=prod(1+d for d in c)): yield k
CROSSREFS
KEYWORD
sign,look
AUTHOR
Mikhail Kurkov, May 22 2019
EXTENSIONS
Comments and two formulas moved to A329893, which is an "uncompressed" version of this sequence. - Antti Karttunen, Dec 11 2019
STATUS
approved