cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A325803 Nonzero terms of Product_{k=0..floor(log_2(n))} (1 + A004718(floor(n/(2^k)))).

This page as a plain text file.
%I A325803 #42 Apr 22 2024 22:30:20
%S A325803 1,2,6,-6,24,-18,-48,120,18,-72,-192,48,-360,720,54,144,-360,384,-960,
%T A325803 144,-1800,720,-2880,5040,-54,216,576,-144,1080,-2160,1536,-384,2880,
%U A325803 -5760,-144,576,5400,-10800,2880,-720,-17280,8640,-25200,40320,-162,-432,1080
%N A325803 Nonzero terms of Product_{k=0..floor(log_2(n))} (1 + A004718(floor(n/(2^k)))).
%C A325803 See A329893.
%H A325803 Mikhail Kurkov, <a href="/A325803/b325803.txt">Table of n, a(n) for n = 1..13495</a>
%F A325803 a(n) = A329893(A325804(n)). - _Antti Karttunen_, Dec 10 2019
%t A325803 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 *)
%o A325803 (PARI) b(n) = if(n==0, 0, (-1)^(n+1)*b(n\2) + n%2); \\ A004718
%o A325803 f(n) = if(n==0, 1, prod(k=0, logint(n,2), 1+b(n\2^k)));
%o A325803 lista(nn) = for (n=0, nn, if (f(n), print1(f(n), ", "))); \\ _Michel Marcus_, May 26 2019
%o A325803 (Python)
%o A325803 from itertools import count, islice
%o A325803 from math import prod
%o A325803 def A325803_gen(): # generator of terms
%o A325803     for n in count(0):
%o A325803         c, s = [0]*(m:=n.bit_length()), bin(n)[2:]
%o A325803         for i in range(m):
%o A325803             if s[i]=='1':
%o A325803                 for j in range(m-i):
%o A325803                     c[j] = c[j]+1
%o A325803             else:
%o A325803                 for j in range(m-i):
%o A325803                     c[j] = -c[j]
%o A325803         if (k:=prod(1+d for d in c)): yield k
%o A325803 A325803_list = list(islice(A325803_gen(),20)) # _Chai Wah Wu_, Mar 03 2023
%Y A325803 Cf. A000120, A001405, A004718, A284005, A325804, A329893.
%K A325803 sign,look
%O A325803 1,2
%A A325803 _Mikhail Kurkov_, May 22 2019
%E A325803 Comments and two formulas moved to A329893, which is an "uncompressed" version of this sequence. - _Antti Karttunen_, Dec 11 2019