cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A101921 a(2n) = a(n) + 2n - 1, a(2n+1) = 4n.

Original entry on oeis.org

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, 49, 52, 52, 56, 57, 60, 57, 64, 65, 68, 68, 72, 73, 76, 75, 80, 81, 84, 84, 88, 89, 92, 90, 96, 97, 100, 100, 104, 105, 108, 107, 112, 113, 116, 116, 120, 121, 124, 120, 128
Offset: 1

Views

Author

Ralf Stephan, Dec 21 2004

Keywords

Comments

Exponent of 2 in tangent numbers A000182.
Also, exponent of 2 in the sequences A008775, A009670, A009764, A009798, A012227, A024236, A024277, A024299, A052510.
Also, exponent of 2 in 4^(n-1)/n. [David Brink, Aug 08 2013]

Examples

			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 + ...
		

Crossrefs

Programs

  • Mathematica
    a[n_]:= If[n<1, 0, 2n -2 - IntegerExponent[n, 2]]; (* Michael Somos, Mar 02 2014 *)
  • PARI
    a(n)=valuation(4^(n-1)/n,2); \\ Joerg Arndt, Aug 13 2013
    
  • Python
    def A101921(n): return (n-1<<1)-(~n & n-1).bit_length() # Chai Wah Wu, Apr 14 2023
  • Sage
    [2*n-2 -valuation(n,2) for n in (1..100)] # G. C. Greubel, Nov 29 2021
    

Formula

a(n) = 2n - 2 - A007814(n).
a(n) = A007814(A000182(n)).
G.f.: Sum_{k>=0} t^2*(1+4*t+t^2)/(1-t^2)^2 where t=x^2^k.

A003707 Expansion of e.g.f. log(1 + tan(x)).

Original entry on oeis.org

0, 1, -1, 4, -14, 80, -496, 3904, -34544, 354560, -4055296, 51733504, -724212224, 11070525440, -183218384896, 3266330312704, -62380415842304, 1270842139934720, -27507260369207296, 630424777638805504, -15250924309151350784, 388362339077351014400, -10384039093607251050496
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections are A002436 and |A024299|.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 25); [0] cat Coefficients(R!(Laplace( Log(1 + Tan(x)) ))); // G. C. Greubel, Jun 08 2020
    
  • Maple
    seq(coeff(series( log(1 +tan(x)), x, n+1)*n!, x, n), n = 0..25); # G. C. Greubel, Jun 08 2020
  • Mathematica
    With[{nn = 30}, CoefficientList[Series[Log[1 + Tan[x]], {x, 0, nn}], x] Range[0, nn]!] (* Vincenzo Librandi, Apr 11 2014 *)
  • Maxima
    a(n):=sum((-1)^(k+1)*if evenp(n+k) then (-1)^((n+k)/2)/k*sum(j!*stirling2(n,j)*2^(n-j)*(-1)^(n+j-k)*binomial(j-1,k-1),j,k,n) else 0,k,1,n);  /* Vladimir Kruchinin, Aug 18 2010 */ /* Corrected by Petros Hadjicostas, Jun 05 2020 */
    
  • Maxima
    a(n):=sum(sum(binomial(j+n-2*m-1,n-2*m-1)*(j+n-2*m)!*2^(2*m-j)*(-1)^(n-m+j-1)*stirling2(n,j+n-2*m),j,0,2*m)/(n-2*m),m,0,(n-1)/2); /* Vladimir Kruchinin, Jan 21 2012 */
    
  • PARI
    my(x='x+O('x^66)); concat([0],Vec(serlaplace(log(1+tan(x))))) \\ Joerg Arndt, Sep 02 2013
    
  • Sage
    def A003707_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( log(1 +tan(x)) ).egf_to_ogf().list()
    A003707_list(25) # G. C. Greubel, Jun 08 2020

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1) * evenp(n+k) * (-1)^((n+k)/2)/k * Sum_{j=k..n} j! * Stirling2(n, j) * 2^(n-j) * (-1)^(n+j-k) * binomial(j-1,k-1). [Vladimir Kruchinin, Aug 18 2010] [Corrected by Petros Hadjicostas, Jun 05 2020]
a(n) = Sum_{m=0..(n-1)/2} Sum_{j=0..2*m} binomial(j+n-2*m-1, n-2*m-1) * (j+n-2*m)! * 2^(2*m-j) * (-1)^(n-m+j-1) * Stirling2(n, j+n-2*m)/(n-2*m). [Vladimir Kruchinin, Jan 21 2012]
a(n) ~ (-1)^(n+1) * 4^n * (n-1)! / Pi^n. - Vaclav Kotesovec, Feb 16 2015

Extensions

Name corrected, more terms, Joerg Arndt, Sep 02 2013

A009403 Expansion of e.g.f. log(1 + tanh(x)^2), even powers only.

Original entry on oeis.org

0, 2, -28, 992, -69088, 8110592, -1448424448, 366436769792, -124760831684608, 55014520738414592, -30501848618302701568, 20768078187214502100992, -17035983844637174375907328, 16570619538920401323784404992
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A024299.

Programs

  • Magma
    L:=RiemannZeta();
    [0] cat [-Round(4^n*(4^n-2)*(4^n-1)*Evaluate(L, 1-2*n)): n in [1..20]]; // G. C. Greubel, Jul 12 2022
    
  • Mathematica
    With[{nn=30},Take[CoefficientList[Series[Log[1+Tanh[x]^2],{x,0,nn}],x] Range[0,nn]!,{1,-1,2}]] (* Harvey P. Dale, Aug 27 2013 *)
  • SageMath
    [0]+[-4^n*(4^n-2)*(4^n-1)*zeta(1-2*n) for n in (1..20)] # G. C. Greubel, Jul 12 2022

Formula

a(n) ~ (-1)^(n+1) * 2^(4*n) * (2*n)! / (n * Pi^(2*n)). - Vaclav Kotesovec, Apr 20 2014
From G. C. Greubel, Jul 12 2022: (Start)
a(n) = 2*A024299(n).
a(n) = -4^n * (4^n - 2)*(4^n - 1)*Zeta(1-2*n), with a(0) = 0. (End)

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997
Previous Mathematica program replaced by Harvey P. Dale, Aug 27 2013
Showing 1-3 of 3 results.