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.

A107373 a(n) = (n/2)*binomial(n-1, floor((n-1)/2)) - 2^(n-2).

Original entry on oeis.org

0, 0, 1, 2, 7, 14, 38, 76, 187, 374, 874, 1748, 3958, 7916, 17548, 35096, 76627, 153254, 330818, 661636, 1415650, 2831300, 6015316, 12030632, 25413342, 50826684, 106853668, 213707336, 447472972, 894945944, 1867450648, 3734901296, 7770342787, 15540685574
Offset: 1

Views

Author

N. J. A. Sloane, Jul 20 2007

Keywords

Comments

Total number of descents in all faro permutations of length n-1. Faro permutations are permutations avoiding the three consecutive patterns 231, 321 and 312. They are obtained by a perfect faro shuffle of two nondecreasing words of lengths differing by at most one. See also A340567, A340568 and A340569. - Sergey Kirgizov, Jan 11 2021

Crossrefs

Programs

Formula

a(2*n) = 2*A000531(n-1); a(2*n+1) = A000531(n). - Max Alekseyev, Sep 30 2013
(1-n)*a(n) + 2*(n-1)*a(n-1) + 4*(n-2)*a(n-2) + 8*(-n+2)*a(n-3) = 0. - R. J. Mathar, May 26 2013

A275365 a(1)=2, a(2)=2; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).

Original entry on oeis.org

0, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 52, 2, 54, 2, 56, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2, 72, 2, 74
Offset: 0

Views

Author

Nathan Fox, Jul 24 2016

Keywords

Comments

a(n) is the solution to the recurrence relation a(n) = a(n-a(n-1)) + a(n-a(n-2)) [Hofstadter's Q recurrence], with the initial conditions: a(n) = 0 if n <= 0; a(1) = 2, a(2) = 2.
Starting with n=1, a(n) is A005843 interleaved with A007395.
This sequence is the same as A133265 with the leading 2 changed to a 0.

Crossrefs

Programs

  • Mathematica
    Join[{0}, LinearRecurrence[{0, 2, 0, -1}, {2, 2, 4, 2}, 73]] (* Jean-François Alcover, Feb 19 2019 *)

Formula

a(0) = 0; thereafter, a(2n) = 2, a(2n+1) = 2n+2.
a(n) = 2*a(n-2) - a(n-4) for n>4.
G.f.: -(2*x^3 -2*x -2)/((x-1)^2*(x+1)^2).

A384932 Decimal expansion of tan(1) + sec(1).

Original entry on oeis.org

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

Views

Author

Kritsada Moomuang, Jun 12 2025

Keywords

Comments

The continued fraction expansion of this constant - 1 is A133265.

Examples

			3.408223442335827848481...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Tan[1] + Sec[1], 10, 100, 0][[1]]
  • PARI
    tan(1) + 1/cos(1) \\ Amiram Eldar, Jun 13 2025

Formula

Equals A049471 + A073448.
Equals 4 + Integral_{x=0..1} sin(x)/(sin(x) - 1) dx.
Equals exp(Integral_{x=0..1} sec(x) dx).
Equals exp(A248617). - Hugo Pfoertner, Jun 13 2025
Showing 1-3 of 3 results.