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 A101921 #31 Apr 15 2023 01:51:16 %S A101921 0,1,4,4,8,9,12,11,16,17,20,20,24,25,28,26,32,33,36,36,40,41,44,43,48, %T A101921 49,52,52,56,57,60,57,64,65,68,68,72,73,76,75,80,81,84,84,88,89,92,90, %U A101921 96,97,100,100,104,105,108,107,112,113,116,116,120,121,124,120,128 %N A101921 a(2n) = a(n) + 2n - 1, a(2n+1) = 4n. %C A101921 Exponent of 2 in tangent numbers A000182. %C A101921 Also, exponent of 2 in the sequences A008775, A009670, A009764, A009798, A012227, A024236, A024277, A024299, A052510. %C A101921 Also, exponent of 2 in 4^(n-1)/n. [_David Brink_, Aug 08 2013] %H A101921 Iain Fox, <a href="/A101921/b101921.txt">Table of n, a(n) for n = 1..10000</a> %F A101921 a(n) = 2n - 2 - A007814(n). %F A101921 a(n) = A007814(A000182(n)). %F A101921 G.f.: Sum_{k>=0} t^2*(1+4*t+t^2)/(1-t^2)^2 where t=x^2^k. %e A101921 G.f. = x^2 + 4*x^3 + 4*x^4 + 8*x^5 + 9*x^6 + 12*x^7 + 11*x^8 + 16*x^9 + 17*x^10 + ... %t A101921 a[n_]:= If[n<1, 0, 2n -2 - IntegerExponent[n, 2]]; (* _Michael Somos_, Mar 02 2014 *) %o A101921 (PARI) a(n)=valuation(4^(n-1)/n,2); \\ _Joerg Arndt_, Aug 13 2013 %o A101921 (Sage) [2*n-2 -valuation(n,2) for n in (1..100)] # _G. C. Greubel_, Nov 29 2021 %o A101921 (Python) %o A101921 def A101921(n): return (n-1<<1)-(~n & n-1).bit_length() # _Chai Wah Wu_, Apr 14 2023 %Y A101921 Cf. A000182, A007814. %Y A101921 Cf. A008775, A009670, A009764, A009798, A012227, A024236, A024277, A024299, A052510. %K A101921 nonn %O A101921 1,3 %A A101921 _Ralf Stephan_, Dec 21 2004