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 A318666 #23 Jun 25 2024 12:23:10 %S A318666 1,1,2,1,1,2,1,1,4,1,1,2,1,1,2,1,1,4,1,1,2,1,1,2,1,1,8,1,1,2,1,1,2,1, %T A318666 1,4,1,1,2,1,1,2,1,1,4,1,1,2,1,1,2,1,1,8,1,1,2,1,1,2,1,1,4,1,1,2,1,1, %U A318666 2,1,1,4,1,1,2,1,1,2,1,1,16,1,1,2,1,1,2,1,1,4,1,1,2,1,1,2,1,1,4,1,1,2,1,1,2 %N A318666 a(n) = 2^{the 3-adic valuation of n}. %H A318666 Antti Karttunen, <a href="/A318666/b318666.txt">Table of n, a(n) for n = 1..65537</a> %F A318666 a(n) = 2^A007949(n). %F A318666 a(n) = A046644(n)/A317932(n). %F A318666 Multiplicative with a(3^e) = 2^e, a(p^e) = 1 for any other primes. %F A318666 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - _Amiram Eldar_, Nov 17 2022 %F A318666 Dirichlet g.f.: zeta(s)*(3^s-1)/(3^s-2). - _Amiram Eldar_, Jan 03 2023 %F A318666 More precise asymptotics: Sum_{k=1..n} a(k) ~ 2*n + zeta(log(2)/log(3)) * n^(log(2)/log(3)) / (2*log(2)). - _Vaclav Kotesovec_, Jun 25 2024 %t A318666 Table[2^IntegerExponent[n, 3], {n, 100}] (* _Vincenzo Librandi_, Mar 19 2020 *) %o A318666 (PARI) A318666(n) = 2^valuation(n,3); %o A318666 (PARI) A318666(n) = { my(f = factor(n), m=1); for(i=1, #f~, if(3 == f[i,1], m *= 2^f[i,2])); (m); }; %o A318666 (Magma) [2^Valuation(n, 3): n in [1..100]]; // _Vincenzo Librandi_, Mar 19 2020 %Y A318666 Cf. A000079, A007949, A046644, A317932. %K A318666 nonn,mult %O A318666 1,3 %A A318666 _Antti Karttunen_, Sep 03 2018