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-7 of 7 results.

A007595 a(n) = C_n / 2 if n is even or ( C_n + C_((n-1)/2) ) / 2 if n is odd, where C = Catalan numbers (A000108).

Original entry on oeis.org

1, 1, 3, 7, 22, 66, 217, 715, 2438, 8398, 29414, 104006, 371516, 1337220, 4847637, 17678835, 64823110, 238819350, 883634026, 3282060210, 12233141908, 45741281820, 171529836218, 644952073662, 2430973304732, 9183676536076, 34766775829452, 131873975875180
Offset: 1

Views

Author

Keywords

Comments

Number of necklaces of 2 colors with 2n beads and n-1 black ones. - Wouter Meeussen, Aug 03 2002
Number of rooted planar binary trees up to reflection (trees with n internal nodes, or a total of 2n+1 nodes). - Antti Karttunen, Aug 19 2002
Number of even permutations avoiding 132.
Number of Dyck paths of length 2n having an even number of peaks at even height. Example: a(3)=3 because we have UDUDUD, U(UD)(UD)D and UUUDDD, where U=(1,1), D=(1,-1) and the peaks at even height are shown between parentheses. - Emeric Deutsch, Nov 13 2004
Number of planar trees (A002995) on n edges with one distinguished edge. - David Callan, Oct 08 2005
Assuming offset 0 this is an analog of A275165: pairs of two Catalan nestings with index sum n. - R. J. Mathar, Jul 19 2016

References

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

Crossrefs

a(n) = A047996(2*n, n-1) for n >= 1 and a(n) = A072506(n, n-1) for n >= 2.
Occurs in A073201 as rows 0, 2, 4, etc. (with a(0)=1 included).
Cf. also A003444, A007123.

Programs

  • Maple
    A007595 := n -> (1/2)*(Cat(n) + (`mod`(n,2)*Cat((n-1)/2))); Cat := n -> binomial(2*n,n)/(n+1);
  • Mathematica
    Table[(Plus@@(EulerPhi[ # ]Binomial[2n/#, (n-1)/# ] &)/@Intersection[Divisors[2n], Divisors[n-1]])/(2n), {n, 2, 32}] (* or *) Table[If[EvenQ[n], CatalanNumber[n]/2, (CatalanNumber[n] + CatalanNumber[(n-1)/2])/2], {n, 24}]
    Table[(CatalanNumber[n] + 2^n Binomial[1/2, (n + 1)/2] Sin[Pi n/2])/2, {n, 1, 20}] (* Vladimir Reshetnikov, Oct 03 2016 *)
    Table[If[EvenQ[n],CatalanNumber[n]/2,(CatalanNumber[n]+CatalanNumber[(n-1)/2])/2],{n,30}] (* Harvey P. Dale, Sep 06 2021 *)
  • PARI
    catalan(n) = binomial(2*n, n)/(n+1);
    a(n) = if (n % 2, (catalan(n) + catalan((n-1)/2))/2, catalan(n)/2); \\ Michel Marcus, Jan 23 2016

Formula

G.f.: (2-2*x-sqrt(1-4*x)-sqrt(1-4*x^2))/x/4. - Vladeta Jovovic, Sep 26 2003
D-finite with recurrence: n*(n+1)*a(n) -6*n*(n-1)*a(n-1) +4*(2*n^2-10*n+9)*a(n-2) +8*(n^2+n-9)*a(n-3) -48*(n-3)*(n-4)*a(n-4) +32*(2*n-9)*(n-5)*a(n-5)=0. - R. J. Mathar, Jun 03 2014, adapted to offset Feb 20 2020
a(n) ~ 4^n /(2*sqrt(Pi)*n^(3/2)). - Ilya Gutkovskiy, Jul 19 2016
a(2n) = A000150(2n). - R. J. Mathar, Jul 19 2016
a(n) = (A000108(n) + 2^n * binomial(1/2, (n+1)/2) * sin(Pi*n/2))/2. - Vladimir Reshetnikov, Oct 03 2016
Sum_{n>=1} a(n)/4^n = (3-sqrt(3))/2 (A334843). - Amiram Eldar, Mar 20 2022

Extensions

Description corrected by Reiner Martin and Wouter Meeussen, Aug 04 2002

A375069 Decimal expansion of the sagitta of a regular hexagon with unit side length.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Jul 30 2024

Keywords

Examples

			0.133974596215561353236276829247063816528597373...
		

Crossrefs

Essentially the same as A334843.
Cf. A010527 (apothem), A104956 (area).
Cf. sagitta of other polygons with unit side length: A020769 (triangle), A174968 (square), A375068 (pentagon), A374972 (heptagon), A375070 (octagon), A375153 (9-gon), A375189 (10-gon), A375192 (11-gon), A375194 (12-gon).

Programs

Formula

Equals tan(Pi/12)/2 = A019913/2.
Equals 1 - sqrt(3)/2 = 1 - A010527.
Equals A152422^2 = (1 - A332133)^2. - Hugo Pfoertner, Jul 30 2024
Equals A334843-1/2. - R. J. Mathar, Aug 02 2024

A156309 Decimal expansion of the absolute value of the larger solution of (n^2+n)/2 = -1/12. (Real root q of 6n^2 + 6n + 1, the other root being p = -1-q.)

Original entry on oeis.org

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

Views

Author

Daniele P. Morelli, Feb 07 2009

Keywords

Comments

The formula returning the n-th triangular number (A000217) is (n^2+n)/2. On the other hand, Ramanujan's identity claims that the value of the infinite sum 1+2+3+.... is -1/12. This irrational number is the solution of the equation (n^2+n)/2 = -1/12, that is, the "limit" triangular number.
Equals the Knuth's random generators constant, that is, the ratio c/m in congruence random number generators of the type X_(n+1) = (aX_n +c) mod (m) which minimizes the correlation between successive values. - Stanislav Sykora, Nov 13 2013
It is also the fraction of the full solid angle cut out by a cone having the magic angle (A195696) as its polar angle. - Stanislav Sykora, Nov 13 2013

Examples

			The two roots of 6n^2 + 6n + 1 = 0 are -0.21132... and -0.78867513... (Cf. A020769.)
		

References

  • B. Candelpergher, Ramanujan summation of divergent series. Lectures notes in mathematics 2185, Springer 2017.
  • D. E. Knuth, The Art of Computer Programming, Vol. 2, Addison-Wesley, 1969, Chapter 3.3.3.

Crossrefs

Programs

  • Mathematica
    First[RealDigits[(3 - Sqrt[3])/6, 10, 100]] (* Paolo Xausa, Jun 25 2024 *)
  • PARI
    abs(solve(n=-1/2, 0, 6*n^2+6*n+1)) \\ Michel Marcus, Oct 05 2013

Formula

(1 - 1/sqrt(3))/2 = (1 - A020760)/2 = 1/2 - A020769. - R. J. Mathar, Feb 10 2009
Equals - HurwitzZeta(-1, (9 - sqrt(3))/6). - Peter Luschny, Jul 05 2020
Equals (3 - sqrt(3))/6. - Michel Marcus, Jun 10 2021
Equals 1/A165663 = A334843/3. - Hugo Pfoertner, Jun 25 2024

Extensions

Flipped sign of definition, corrected offset, simplified formula R. J. Mathar, Feb 10 2009

A332634 Decimal expansion of arclength between (0,0) and (Pi/6,1) on y = tan x.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 15 2020

Keywords

Examples

			arclength = 0.780131428280849333559981872217733063687522...
		

Crossrefs

Programs

  • Mathematica
    s = Integrate[Sqrt[1 + D[Tan[x], x]^2], {x, 0, Pi/6}]
    r = N[s, 200]
    RealDigits[r][[1]]

A334842 Decimal expansion of arclength between (0,0) and (Pi/3,sqrt(3)) on y = tan x.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 15 2020

Keywords

Examples

			arclength = 2.056999740078724233251017930691409549645541986...
		

Crossrefs

Programs

  • Mathematica
    s = Integrate[Sqrt[1 + D[Tan[x], x]^2], {x, 0, Pi/3}]
    r = N[s, 200]
    RealDigits[r][[1]]

A334844 Decimal expansion of arclength between (0,0) and (1,sin 1) on y = sin x.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 15 2020

Keywords

Examples

			arclength = 1.311442498215547045545494653761965117948990...
		

Crossrefs

Programs

  • Mathematica
    s = Integrate[Sqrt[1 + D[Sin[x], x]^2], {x, 0, 1}]
    r = N[s, 200]
    RealDigits[r][[1]]

Formula

arclength = sqrt(2)*E(1,1/2), where E = elliptic integral of the second kind.

A362695 Decimal expansion of (3 - sqrt(3))/4.

Original entry on oeis.org

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

Views

Author

Jodi Spitz, Apr 29 2023

Keywords

Comments

Consider the optimal packing of 2 identical spheres in a cube of edge length 1. The radius of both spheres is (3 - sqrt(3))/4 = 0.3169872....

Examples

			0.3169872981077806766181384146235...
		

Crossrefs

Cf. A334843 (their diameter).

Programs

  • Mathematica
    RealDigits[(3 - Sqrt[3])/4, 10, 120][[1]] (* Amiram Eldar, Jun 25 2023 *)
Showing 1-7 of 7 results.