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-10 of 14 results. Next

A093178 If n is even then 1, otherwise n.

Original entry on oeis.org

1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 13, 1, 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, 25, 1, 27, 1, 29, 1, 31, 1, 33, 1, 35, 1, 37, 1, 39, 1, 41, 1, 43, 1, 45, 1, 47, 1, 49, 1, 51, 1, 53, 1, 55, 1, 57, 1, 59, 1, 61, 1, 63, 1, 65, 1, 67, 1, 69, 1, 71, 1, 73, 1, 75, 1, 77, 1, 79, 1, 81, 1, 83, 1, 85
Offset: 0

Views

Author

Michael Somos, Mar 27 2004

Keywords

Comments

Continued fraction expansion for tan(1).
1 followed by run lengths of A062557 = 2n-1 1's followed by a 2. - Jeremy Gardiner, Aug 12 2012
Greatest common divisor of n and (n+1) mod 2. - Bruno Berselli, Mar 07 2017

Examples

			1.557407724654902230506974807... = 1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + ...))))
G.f. = 1 + x + x^2 + 3*x^3 + x^4 + 5*x^5 + x^6 + 7*x^7 + x^8 + 9*x^9 + x^10 + ...
		

Crossrefs

Equals |A009001(n)|.
Cf. A133080, A049471 (decimal expansion), A009001, A161738, A062557, A124625.

Programs

  • Maple
    A093178:=n->(n+1+(1-n)*(-1)^n)/2; seq(A093178(k), k=0..100); # Wesley Ivan Hurt, Oct 19 2013
  • Mathematica
    Join[{1},Riffle[Range[1,85,2],1]] (* or *) Array[If[EvenQ[#],1,#]&,87,0] (* Harvey P. Dale, Nov 23 2011 *)
  • PARI
    {a(n) = if( n%2, n, 1)};

Formula

G.f.: (1+x-x^2+x^3)/(1-x^2)^2.
a(n) = (-1)^n * a(-n) for all n in Z.
a(n) = (1/2) * [ 1 + n + (1-n)*(-1)^n ]. - Ralf Stephan, Dec 02 2004
a(n) = n^n mod (n+1) for n > 0. - Amarnath Murthy, Apr 18 2004
Satisfies a(0) = 1, a(n+1) = a(n) + n if a(n) < n else a(n+1) = a(n)/n. - Amarnath Murthy, Oct 29 2002
a(n) = ((n+1)+(1-n)(-1)^n)/2 and have e.g.f. (1+x)cosh(x). - Paul Barry, Apr 09 2003
a(n) = binomial(n, 2*floor(n/2)). - Paul Barry, Dec 28 2006
Starting (1, 1, 3, 1, 5, 1, 7, ...) = A133080^(-1) * [1,2,3,...]. - Gary W. Adamson, Sep 08 2007
a(n) = denom(b(n+2)/b(n+1)) with b(n) = product((2*n-3-2*k), k=0..floor(n/2-1)). - Johannes W. Meijer, Jun 18 2009
a(n) = 2*floor(n/2) - n*(n-1 mod 2) + 1. - Wesley Ivan Hurt, Oct 19 2013
a(n) = n^(n mod 2). - Wesley Ivan Hurt, Apr 16 2014

A073449 Decimal expansion of cot(1).

Original entry on oeis.org

6, 4, 2, 0, 9, 2, 6, 1, 5, 9, 3, 4, 3, 3, 0, 7, 0, 3, 0, 0, 6, 4, 1, 9, 9, 8, 6, 5, 9, 4, 2, 6, 5, 6, 2, 0, 2, 3, 0, 2, 7, 8, 1, 1, 3, 9, 1, 8, 1, 7, 1, 3, 7, 9, 1, 0, 1, 1, 6, 2, 2, 8, 0, 4, 2, 6, 2, 7, 6, 8, 5, 6, 8, 3, 9, 1, 6, 4, 6, 7, 2, 1, 9, 8, 4, 8, 2, 9, 1, 9, 7, 6, 0, 1, 9, 6, 8, 0, 4, 6, 5, 8, 1, 4
Offset: 0

Views

Author

Rick L. Shepherd, Aug 01 2002

Keywords

Comments

By the Lindemann-Weierstrass theorem, this constant is transcendental. - Charles R Greathouse IV, May 13 2019

Examples

			0.64209261593433070300641998659...
		

Crossrefs

Cf. A049471 (tan(1)=1/A073449), A049469 (sin(1)), A049470 (cos(1)), A073447 (csc(1)), A073448 (sec(1)).

Programs

  • Mathematica
    RealDigits[Cot[1], 10, 100][[1]] (* Amiram Eldar, May 15 2021 *)
  • PARI
    cotan(1)

Formula

Equals Sum_{k>=0} (-1)^k * B(2*k) * 2^(2*k) / (2*k)!, where B(k) is the k-th Bernoulli number. - Amiram Eldar, May 15 2021

A073447 Decimal expansion of csc(1).

Original entry on oeis.org

1, 1, 8, 8, 3, 9, 5, 1, 0, 5, 7, 7, 8, 1, 2, 1, 2, 1, 6, 2, 6, 1, 5, 9, 9, 4, 5, 2, 3, 7, 4, 5, 5, 1, 0, 0, 3, 5, 2, 7, 8, 2, 9, 8, 3, 4, 0, 9, 7, 9, 6, 2, 6, 2, 5, 2, 6, 5, 2, 5, 3, 6, 6, 6, 3, 5, 9, 1, 8, 4, 3, 6, 7, 3, 5, 7, 1, 9, 0, 4, 8, 7, 9, 1, 3, 6, 6, 3, 5, 6, 8, 0, 3, 0, 8, 5, 3, 0, 2, 3, 2, 4, 7, 2, 4
Offset: 1

Views

Author

Rick L. Shepherd, Aug 01 2002

Keywords

Comments

By the Lindemann-Weierstrass theorem, this constant is transcendental. - Charles R Greathouse IV, May 13 2019

Examples

			1.18839510577812121626159945237...
		

Crossrefs

Cf. A049469 (sin(1)=1/A073447), A049470 (cos(1)), A049471 (tan(1)), A073448 (sec(1)), A073449 (cot(1)).

Programs

  • Mathematica
    RealDigits[Csc[1], 10, 120][[1]] (* Amiram Eldar, May 29 2023 *)
  • PARI
    1/sin(1)

Formula

Equals Sum_{n=-oo..oo} ((-1)^n/(1 + n*Pi)). - Jean-François Alcover, Mar 21 2013.
Equals Sum_{k>=0} (-1)^k * (2 - 4^k) * bernoulli(2*k)/(2*k)! = Sum_{k>=0} (-1)^k * (2 - 4^k) * A027641(2*k)/(A027642(2*k)*(2*k)!). - Amiram Eldar, Aug 03 2020

A073448 Decimal expansion of sec(1).

Original entry on oeis.org

1, 8, 5, 0, 8, 1, 5, 7, 1, 7, 6, 8, 0, 9, 2, 5, 6, 1, 7, 9, 1, 1, 7, 5, 3, 2, 4, 1, 3, 9, 8, 6, 5, 0, 1, 9, 3, 4, 7, 0, 3, 9, 6, 6, 5, 5, 0, 9, 4, 0, 0, 9, 2, 9, 8, 8, 3, 5, 1, 5, 8, 2, 7, 7, 8, 5, 8, 8, 1, 5, 4, 1, 1, 2, 6, 1, 5, 9, 6, 7, 0, 5, 9, 2, 1, 8, 4, 1, 4, 1, 3, 2, 8, 7, 3, 0, 6, 6, 7, 1, 1, 4, 9, 1, 0
Offset: 1

Views

Author

Rick L. Shepherd, Aug 01 2002

Keywords

Comments

By the Lindemann-Weierstrass theorem, this constant is transcendental. - Charles R Greathouse IV, May 13 2019

Examples

			1.85081571768092561791175324139...
		

Crossrefs

Cf. A049470 (cos(1)=1/A073448), A049469 (sin(1)), A049471 (tan(1)), A073447 (csc(1)), A073449 (cot(1)), A122045.

Programs

  • Mathematica
    RealDigits[Sec[1],10,120][[1]] (* Harvey P. Dale, Mar 13 2013 *)
  • PARI
    1/cos(1)

Formula

Equals Sum_{k>=0} (-1)^k * E(2*k) / (2*k)!, where E(k) is the k-th Euler number (A122045). - Amiram Eldar, May 15 2021

A009001 Expansion of e.g.f: (1+x)*cos(x).

Original entry on oeis.org

1, 1, -1, -3, 1, 5, -1, -7, 1, 9, -1, -11, 1, 13, -1, -15, 1, 17, -1, -19, 1, 21, -1, -23, 1, 25, -1, -27, 1, 29, -1, -31, 1, 33, -1, -35, 1, 37, -1, -39, 1, 41, -1, -43, 1, 45, -1, -47, 1, 49, -1, -51, 1, 53, -1, -55, 1, 57, -1, -59, 1, 61, -1, -63, 1, 65, -1, -67, 1, 69, -1, -71, 1, 73, -1, -75, 1, 77, -1, -79, 1, 81, -1, -83, 1, 85
Offset: 0

Views

Author

Keywords

Comments

If signs are ignored, continued fraction for tan(1) (cf. A093178).

Examples

			tan(1) = 1.557407724654902230... = 1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + ...)))). - _Harry J. Smith_, Jun 15 2009
G.f. = 1 + x - x^2 - 3*x^3 + x^4 + 5*x^5 - x^6 - 7*x^7 + x^8 + 9*x^9 - x^10 + ...
		

Crossrefs

Cf. A009531, A049471 (decimal expansion of tan(1)).

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!((1+x)*Cos(x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Jul 21 2018
  • Maple
    seq(coeff(series(factorial(n)*(1+x)*cos(x), x,n+1),x,n),n=0..90); # Muniru A Asiru, Jul 21 2018
  • Mathematica
    With[{nn=90},CoefficientList[Series[(1+x)Cos[x],{x,0,nn}],x]Range[0,nn]!] (* Harvey P. Dale, Jul 15 2012 *)
    LinearRecurrence[{0, -2, 0, -1}, {1, 1, -1, -3}, 100] (* Jean-François Alcover, Feb 21 2020 *)
    FoldList[If[Mod[#2, 4]==1, #1*#2, If[Mod[#2, 4]==2, #1-#2,If[Mod[#2,4] ==3,#1*#2,#1+#2]]]&, 1, Range[1, 85]] (* James C. McMahon, Oct 12 2023 *)
  • PARI
    {a(n) = (-1)^(n\2) * if( n%2, n, 1)} /* Michael Somos, Oct 16 2006 */
    

Formula

a(n) = (-1)^(n/2) if n is even, n*(-1)^((n-1)/2) if n is odd.
a(n) = -a(n-2) if n is even, 2*a(n-1) - a(n-2) if n is odd. - Michael Somos, Jan 26 2014
From Henry Bottomley, Oct 19 2001: (Start)
a(n) = (n^n mod (n+1))*(-1)^floor(n/2) for n > 0.
a(n) = (-1)^n*(a(n-2) - a(n-1)) - a(n-3) for n > 2. (End)
G.f.: (1+x+x^2-x^3)/(1+x^2)^2.
E.g.f.: (1+x)*cos(x) = U(0) where U(k) = 1 + x - x^2/((2*k+1)*(2*k+2)) * U(k+1). - Sergei N. Gladkovskii, Oct 17 2012 [Edited by Michael Somos, Jan 26 2014]
From James C. McMahon, Oct 12 2023: (Start)
a(0) = 1; for n > 1,
a(n) = a(n-1) * n if n mod 4 = 1,
a(n-1) - n if n mod 4 = 2,
a(n-1) * n if n mod 4 = 3,
a(n-1) + n if n mod 4 = 4. (End)

Extensions

Formula corrected by Olivier Gérard, Mar 15 1997
Definition clarified by Harvey P. Dale, Jul 15 2012

A161011 Decimal expansion of tan(1/2).

Original entry on oeis.org

5, 4, 6, 3, 0, 2, 4, 8, 9, 8, 4, 3, 7, 9, 0, 5, 1, 3, 2, 5, 5, 1, 7, 9, 4, 6, 5, 7, 8, 0, 2, 8, 5, 3, 8, 3, 2, 9, 7, 5, 5, 1, 7, 2, 0, 1, 7, 9, 7, 9, 1, 2, 4, 6, 1, 6, 4, 0, 9, 1, 3, 8, 5, 9, 3, 2, 9, 0, 7, 5, 1, 0, 5, 1, 8, 0, 2, 5, 8, 1, 5, 7, 1, 5, 1, 8, 0, 6, 4, 8, 2, 7, 0, 6, 5, 6, 2, 1, 8, 5, 8, 9, 1, 0, 4
Offset: 0

Views

Author

Harry J. Smith, Jun 13 2009

Keywords

Comments

By the Lindemann-Weierstrass theorem, this constant is transcendental. - Charles R Greathouse IV, May 13 2019

Examples

			0.546302489843790513255179465780285383297551720179791246164091385932907...
		

Crossrefs

Cf. A019425 (continued fraction). Cf. A049471, A161011 through A161019.

Programs

  • Mathematica
    RealDigits[N[Tan[1/2],6! ]][[1]] (* Vladimir Joseph Stephan Orlovsky, Jun 13 2009 *)
  • PARI
    default(realprecision, 20080); x=10*tan(1/2); for (n=0, 20000, d=floor(x); x=(x-d)*10; write("b161011.txt", n, " ", d));

Formula

From Peter Bala, Nov 17 2019: (Start)
Related simple continued fraction expansions:
tan(1/2) = [0; 1, 1, 4, 1, 8, 1, 12, 1, 16, 1, 20, 1, ...]. See A019425.
2*tan(1/2) = [1, 10, 1, 3, 1, 26, 1, 7, 1, 42, 1, 11, 1, 58, 1, 15, 1, 74, 1, 19, 1, 90, ...]
(1/2)*tan(1/2) = [0; 3, 1, 1, 1, 18, 1, 5, 1, 34, 1, 9, 1, 50, 1, 13, 1, 66, 1, 17, 1, 82, ...].
tan(1/2)/(1 - tan(1/2)) = [1, 4, 1, 8, 1, 12, 1, 16, 1, 20, 1, 24, ...]
2*tan(1/2)/(1 - tan(1/2)) = [2, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, ...]
4*tan(1/2)/(1 - tan(1/2)) = [4, 1, 4, 2, 4, 3, 4, 4, 4, 5, 4, 6, 4, 7, ...]. (End)

A348140 a(n) is the numerator of tan(n * arctan(1/n)).

Original entry on oeis.org

1, 4, 13, 240, 719, 42372, 92567, 14970816, 21475201, 8825080100, 7836127861, 7809130867824, 4132643140079, 9678967816041188, 2973238691433583, 16000787866533953280, 2798084251807349761, 34017524842099233036996, 3336132453587291393821, 90417110945911655996319600
Offset: 1

Views

Author

Amiram Eldar, Oct 02 2021

Keywords

Examples

			The fractions begin with 1, 4/3, 13/9, 240/161, 719/475, 42372/27755, 92567/60319, 14970816/9722113, 21475201/13913289, 8825080100/5707904499, ...
		

Crossrefs

Cf. A049471, A348131, A348132, A348141 (denominators).

Programs

  • Mathematica
    f[n_] := Module[{s = 1/n}, Do[s = (s + 1/n)/(1 - s/n), {k, 1, n - 1}]; s]; Numerator @ Array[f, 20]

Formula

Lim_{n->oo} a(n)/A348141(n) = tan(1) (A049471).

A009753 Expansion of tan(x)/(1+x).

Original entry on oeis.org

0, 1, -2, 8, -32, 176, -1056, 7664, -61312, 559744, -5597440, 61925632, -743107584, 9682766848, -135558735872, 2035284795392, -32564556726272, 553807329689600, -9968531934412800, 189431195638956032, -3788623912779120640
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A049471 (tan(1)).

Programs

  • Maple
    G(x):= tan(x)/(1+x): f[0]:=G(x): for n from 1 to 21 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..20); # Zerinvary Lajos, Apr 03 2009
  • Mathematica
    CoefficientList[Series[Tan[x]/(1 + x), {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Jan 24 2015 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(serlaplace(tan(x)/(1+x)))) \\ G. C. Greubel, Feb 12 2018

Formula

a(n) ~ n! * (-1)^(n+1) * tan(1). - Vaclav Kotesovec, Jan 24 2015

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997

A085666 Decimal expansion of -tan(tan(tan(1))).

Original entry on oeis.org

8, 6, 3, 5, 1, 8, 8, 5, 4, 8, 7, 8, 0, 5, 8, 8, 8, 1, 9, 8, 7, 0, 1, 5, 5, 9, 3, 1, 3, 6, 4, 3, 1, 8, 5, 0, 7, 7, 2, 2, 4, 7, 6, 0, 5, 8, 1, 8, 5, 7, 3, 4, 3, 0, 5, 7, 7, 5, 7, 2, 6, 9, 5, 4, 3, 0, 3, 8, 8, 5, 3, 4, 8, 3, 4, 6, 5, 8, 6, 4, 3, 9, 2, 9, 6, 5, 2, 4, 3, 0, 3, 4, 0, 0, 8, 7, 4, 7, 5
Offset: 0

Views

Author

N. J. A. Sloane, Jul 15 2003

Keywords

Examples

			0.86351885487805888198701559313643185077224760581857...
		

Crossrefs

Cf. A049471.

Programs

A280092 Pierce Expansion of tan(1).

Original entry on oeis.org

1, 1, 2, 8, 12, 44, 51, 298, 934, 1041, 2267, 2668, 13150, 28929, 42652, 610672, 1630027, 2535276, 5451792, 14793658, 32179208, 38644893, 45925185, 59151658, 80924233, 118811249, 273877246, 611892649, 1688111599, 11265859421, 22104337881, 31986803107, 104253472513
Offset: 0

Views

Author

G. C. Greubel, Dec 25 2016

Keywords

Crossrefs

Cf. A049471 (tan(1)).

Programs

  • Mathematica
    PierceExp[A_, n_] := Join[Array[1 &, Floor[A]], First@Transpose@
    NestList[{Floor[1/Expand[1 - #[[1]] #[[2]]]], Expand[1 - #[[1]] #[[2]]]} &, {Floor[1/(A - Floor[A])], A - Floor[A]}, n - 1]]; PierceExp[N[Tan[1] , 7!], 50]
Showing 1-10 of 14 results. Next