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.
%I A325804 #45 Apr 23 2024 08:29:31 %S A325804 0,1,3,6,7,12,14,15,24,25,28,29,30,31,48,50,51,56,57,58,60,61,62,63, %T A325804 96,97,100,101,102,103,112,113,114,115,116,117,120,121,122,123,124, %U A325804 125,126,127,192,194,195,200,201,202,204,205,206,207,224,225,226,228 %N A325804 Positions of nonzero terms of Product_{k=0..floor(log_2(n))} (1 + A004718(floor(n/(2^k)))). %H A325804 Mikhail Kurkov, <a href="/A325804/b325804.txt">Table of n, a(n) for n = 1..13495</a> %F A325804 Conjecture: a(n) - a(n-1) belongs to A094373. - _Mikhail Kurkov_, Feb 20 2021 %t A325804 a[n_?EvenQ] := a[n] = -a[n/2]; a[0] = 0; a[n_] := a[n] = a[(n - 1)/2] + 1; -1 + Position[Table[Product[ 1 + a[Floor[n/(2^k)]], {k, 0, Floor[Log2[n]]}], {n, 0, 500}], _?(# != 0 &)][[All, 1]] (* _Michael De Vlieger_, Apr 22 2024, after _Jean-François Alcover_ at A004718 *) %o A325804 (PARI) b(n) = if(n==0, 0, (-1)^(n+1)*b(n\2) + n%2); \\ A004718 %o A325804 f(n) = if(n==0, 1, prod(k=0, logint(n,2), 1+b(n\2^k))); %o A325804 isok(n) = f(n)!=0; \\ _Michel Marcus_, May 24 2019 %o A325804 (Python) %o A325804 from itertools import count, islice %o A325804 def A325804_gen(startvalue=0): # generator of terms >= startvalue %o A325804 for n in count(max(startvalue,0)): %o A325804 c, s = [0]*(m:=n.bit_length()), bin(n)[2:] %o A325804 for i in range(m): %o A325804 if s[i]=='1': %o A325804 for j in range(m-i): %o A325804 c[j] = c[j]+1 %o A325804 else: %o A325804 for j in range(m-i): %o A325804 c[j] = -c[j] %o A325804 if all(1+d for d in c): yield n %o A325804 A325804_list = list(islice(A325804_gen(),20)) # _Chai Wah Wu_, Mar 03 2023 %Y A325804 Cf. A004718, A325803. %K A325804 nonn %O A325804 1,3 %A A325804 _Mikhail Kurkov_, May 22 2019