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 A340676 #19 Feb 13 2021 14:39:48 %S A340676 0,1,1,2,1,1,1,0,2,1,1,0,1,1,1,3,1,0,1,0,1,1,1,0,2,1,0,0,1,1,1,0,1,1, %T A340676 1,2,1,1,1,0,1,1,1,0,0,1,1,0,2,0,1,0,1,0,1,0,1,1,1,0,1,1,0,0,1,1,1,0, %U A340676 1,1,1,0,1,1,0,0,1,1,1,0,3,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,0,2,1,1,1,0,1 %N A340676 If n is of the form s^(2^e), where s is a squarefree number, and e >= 0, then a(n) = 1+e, otherwise a(n) = 0. %H A340676 Antti Karttunen, <a href="/A340676/b340676.txt">Table of n, a(n) for n = 1..65537</a> %H A340676 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A340676 a(n) = A297109(A225546(n)). %F A340676 For n > 1, a(n) = A104117(A267116(n)). - _Peter Munn_, Feb 05 2021 %t A340676 a[1] = 0; a[n_] := If[Length[(u = Union[FactorInteger[n][[;; , 2]]])] == 1 && u[[1]] == 2^(e = IntegerExponent[u[[1]], 2]), e + 1, 0]; Array[a, 100] (* _Amiram Eldar_, Feb 10 2021 *) %o A340676 (PARI) %o A340676 A001511(n) = 1+valuation(n,2); %o A340676 A209229(n) = (n && !bitand(n,n-1)); %o A340676 A104117(n) = (A209229(n)*A001511(n)); %o A340676 A267116(n) = if(n>1, fold(bitor, factor(n)[, 2]), 0); %o A340676 A340676(n) = if(1==n,0,A104117(A267116(n))); %Y A340676 Cf. A005117, A104117, A225546, A267116, A297109, A340673, A340675. %Y A340676 Positions of zeros: {1} U A340681, of 1's: A005117 \ {1}, of 2's: A062503 \ {1}, of 3's: A113849. %Y A340676 Positions of nonzero terms: A340682, of terms > 1: A340674. %K A340676 nonn %O A340676 1,4 %A A340676 _Antti Karttunen_, Feb 01 2021