|
|
A325803
|
|
Nonzero terms of Product_{k=0..floor(log_2(n))} (1 + A004718(floor(n/(2^k)))).
|
|
3
|
|
|
1, 2, 6, -6, 24, -18, -48, 120, 18, -72, -192, 48, -360, 720, 54, 144, -360, 384, -960, 144, -1800, 720, -2880, 5040, -54, 216, 576, -144, 1080, -2160, 1536, -384, 2880, -5760, -144, 576, 5400, -10800, 2880, -720, -17280, 8640, -25200, 40320, -162, -432, 1080
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Comments and two formulas moved to A329893, which is an "uncompressed" version of this sequence. - Antti Karttunen, Dec 11 2019
|
|
STATUS
|
approved
|
|
|
|