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 A355581 #10 Jul 10 2022 03:56:36 %S A355581 1,2,3,6,8,24,27,32,54,96,128,216,243,384,486,512,864,1536,1944,2048, %T A355581 2187,3456,4374,6144,7776,8192,13824,17496,19683,24576,31104,32768, %U A355581 39366,55296,69984,98304,124416,131072,157464,177147,221184,279936,354294,393216,497664 %N A355581 Exponentially-odd 3-smooth numbers: number of the form 2^i * 3^j where i and j are either 0 or odd. %H A355581 Amiram Eldar, <a href="/A355581/b355581.txt">Table of n, a(n) for n = 1..10000</a> %F A355581 Sum_{n>=1} 1/a(n) = 55/24. %e A355581 6 is a term since 6 = 2^1 * 3^1 and the exponents of 2 and 3 are both odd: 1. %e A355581 24 is a term since 24 = 2^3 * 3^1 and the exponents of 2 and 3 are both odd: 3 and 1, respectively. %t A355581 q[n_] := Module[{e = IntegerExponent[n, {2, 3}]}, (e[[1]] == 0 || OddQ[e[[1]]]) && (e[[2]] == 0 || OddQ[e[[2]]]) && Times@@({2, 3}^e) == n]; Select[Range[500000], q] %o A355581 (PARI) is(n) = {my(e2 = valuation(n, 2), e3 = valuation(n, 3)); (e2 == 0 || e2%2) && (e3 == 0 || e3%2) && n == 2^e2 * 3^e3}; %o A355581 (Python) %o A355581 from itertools import count, takewhile %o A355581 def aupto(lim): %o A355581 pows2 = list(takewhile(lambda x: x<lim, (2**i for i in count(1, 2)))) %o A355581 pows3 = list(takewhile(lambda x: x<lim, (3**i for i in count(1, 2)))) %o A355581 return sorted(c*d for c in [1]+pows2 for d in [1]+pows3 if c*d <= lim) %o A355581 print(aupto(10**6)) # _Michael S. Branicky_, Jul 08 2022 %Y A355581 Intersection of A003586 and A268335. %Y A355581 Subsequences: A002023, A013711, A092810. %Y A355581 Cf. A355580. %K A355581 nonn,easy %O A355581 1,2 %A A355581 _Amiram Eldar_, Jul 08 2022