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 12 results. Next

A054798 Let N(k) and D(k) be the sequences defined in A054765 and A012244; write N(k)* D(k+j ) - N(k+j)*D(k) = (-1)^(k+1)*(k!)^2*P(k) where P(k) is a polynomial in k of degree j-1; sequence gives coefficients of expansion of P(k) in powers of k for j=1,2,3,...

Original entry on oeis.org

1, 2, 3, 5, 20, 19, 12, 90, 214, 160, 29, 348, 1497, 2718, 1744, 70, 1225, 8236, 26453, 40336, 23184, 169, 4056, 39114, 193184, 512813, 689512, 364176, 408, 12852, 167884, 1174860, 4737628, 10955304, 13372072, 6598656, 985, 39400, 669078, 6282340, 35554929, 123708580, 257200712, 290478120, 135484416, 2378, 117711, 2519024, 30514946, 229958030, 1114357079, 3459179856, 6602445344, 6991966752, 3108695040
Offset: 1

Views

Author

N. J. A. Sloane, May 26 2000

Keywords

Examples

			For j=1,2,3 the polynomials P(k) are 1, 3 + 2 k, 19 + 20 k + 5 k^2.
1;
2,3,
5,20,19,
12,90,214,160,
29,348,1497,2718,1744,
70,1225,8236,26453,40336,23184,
169,4056,39114,193184,512813,689512,364176,
408,12852,167884,1174860,4737628,10955304,13372072,6598656,
985,39400,669078,6282340,35554929,123708580,257200712,290478120,135484416,
2378,117711,2519024,30514946,229958030,1114357079,3459179856,6602445344,6991966752,3108695040,
		

Extensions

Sign corrected by R. J. Mathar, Jul 13 2013

A054765 a(n+2) = (2n+3)*a(n+1) + (n+1)^2*a(n), a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 3, 19, 160, 1744, 23184, 364176, 6598656, 135484416, 3108695040, 78831037440, 2189265960960, 66083318415360, 2154235544616960, 75425161203302400, 2822882994841190400, 112463980097804697600
Offset: 0

Views

Author

N. J. A. Sloane, May 26 2000

Keywords

Comments

The denominators of the convergents of [1/3, 4/5, 9/7, 16/9, ...]. To produce Pi the above continued fraction is used. It is formed by n^2/(2*n+1) which starts at n=1. Most numerators of continued fractions are 1 & thus are left out of the brackets. In the case of Pi they vary. Therefore here both numerators & denominators are given. The first 4 convergents are 1/3,5/19,44/160,476/1744. The value of this continued fraction is .273239... . 4*INV(1+.273239...) is Pi. - Al Hakanson (hawkuu(AT)gmail.com), Dec 01 2008
Starting with offset 1 = row sums of triangle A155729. [Gary W. Adamson & Alexander R. Povolotsky, Jan 25 2009]

Crossrefs

Programs

  • Maple
    A054765 := proc(n)
        option remember;
        if n <= 1 then
            n;
        else
            (2*n-1)*procname(n-1)+(n-1)^2*procname(n-2) ;
        end if;
    end proc: # R. J. Mathar, Jul 13 2013
  • Mathematica
    RecurrenceTable[{a[n + 2] == (2*n + 3)*a[n + 1] + (n + 1)^2*a[n],
    a[0] == 0, a[1] == 1}, a, {n,0,50}] (* G. C. Greubel, Feb 18 2017 *)

Formula

a(n) ~ Pi * (1+sqrt(2))^(n + 1/2) * n^n / (2^(9/4) * exp(n)). - Vaclav Kotesovec, Feb 18 2017

Extensions

More terms from James Sellers, May 27 2000

A306800 Square array whose entry A(n,k) is the number of endofunctions on a set of size n with preimage constraint {0,1,...,k}, for n >= 0, k >= 0, read by descending antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 4, 6, 0, 1, 1, 4, 24, 24, 0, 1, 1, 4, 27, 204, 120, 0, 1, 1, 4, 27, 252, 2220, 720, 0, 1, 1, 4, 27, 256, 3020, 29520, 5040, 0, 1, 1, 4, 27, 256, 3120, 44220, 463680, 40320, 0, 1, 1, 4, 27, 256, 3125, 46470, 765030, 8401680, 362880, 0
Offset: 0

Views

Author

Benjamin Otto, Mar 10 2019

Keywords

Comments

A preimage constraint is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set.
Thus, A(n,k) is the number of endofunctions on a set of size n such that each preimage has at most k entries. Equivalently, A(n,k) is the number of n-letter words from an n-letter alphabet such that no letter appears more than k times.

Examples

			Array begins:
  1    1     1     1     1 ...
  0    1     1     1     1 ...
  0    2     4     4     4 ...
  0    6    24    27    27 ...
  0   24   204   252   256 ...
  0  120  2220  3020  3120 ...
  0  720 29520 44220 46470 ...
  ...
		

Crossrefs

A(n,n) gives A000312.
Similar array for preimage condition {i>=0 | i!=k}: A245413.
Number of functions with preimage condition given by the even nonnegative integers: A209289.
Sum over all k of the number of functions with preimage condition {0,k}: A231812.
Cf. A019575.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1, k)*binomial(n, j), j=0..min(k, n))))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Apr 05 2019
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n==0 && i==0, 1, If[i<1, 0, Sum[b[n-j, i-1, k] Binomial[n, j], {j, 0, Min[k, n]}]]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 29 2019, after Alois P. Heinz *)
  • Python
    # print first num_entries entries in column k
    import math, sympy; x=sympy.symbols('x')
    k=5; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
    for term in range(1,num_entries):
       curr_pow=(curr_pow*eP).expand()
       r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

A(n,k) = n! * [x^n] e_k(x)^n, where e_k(x) is the truncated exponential 1 + x + x^2/2! + ... + x^k/k!. When k>1, the link above yields explicit constants c_k, r_k so that the columns are asymptotically c_k * n^(-1/2) * r_k^-n. Stirling's approximation gives column k=1, and column k=0 is 0.
A(n,k) = Sum_{j=1..min(k,n)} A019575(n,j) for n>=1. - Alois P. Heinz, Jun 28 2023

Extensions

Offset changed to 0 by Alois P. Heinz, Jun 28 2023

A054766 a(n+2) = (2*n + 3)*a(n+1) + (n + 1)^2*a(n), a(0) = 1, a(1) = 0.

Original entry on oeis.org

1, 0, 1, 5, 44, 476, 6336, 99504, 1803024, 37019664, 849418560, 21539756160, 598194037440, 18056575823040, 588622339549440, 20609136708249600, 771323264354361600, 30729606721005830400, 1298448658633614566400
Offset: 0

Views

Author

N. J. A. Sloane, May 26 2000

Keywords

Comments

Numerators of the convergents of the generalized continued fraction expansion 4/Pi - 1 = [0; 1/3, 4/5, 9/7,..., n^2/(2*n + 1),...] = 1/(3 + 4/(5 + 9/(7 + ...))). The first 4 convergents are 1/3, 5/19, 44/160 and 476/1744.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n+2] == (2*n+3)*a[n+1] + (n+1)^2*a[n], a[0] == 1, a[1] == 0}, a, {n, 0, 25}] (* Vaclav Kotesovec, Feb 18 2017 *)
    t={1,0};Do[AppendTo[t,(2(n-2)+3)*t[[-1]]+(n-1)^2*t[[-2]]],{n,2,18}];t (* Indranil Ghosh, Feb 25 2017 *)

Formula

a(n) ~ (1 - Pi/4) * (1 + sqrt(2))^(n + 1/2) * n^n / (2^(1/4) * exp(n)). - Vaclav Kotesovec, Feb 18 2017

Extensions

More terms from James Sellers, May 27 2000
Definition expanded by Al Hakanson (hawkuu(AT)gmail.com), Dec 01 2008
Keyword frac added by Michel Marcus, Feb 25 2017

A098461 Expansion of E.g.f.: 1/sqrt(1-2*x-3*x^2).

Original entry on oeis.org

1, 1, 6, 42, 456, 6120, 101520, 1980720, 44634240, 1139080320, 32488646400, 1023985670400, 35345049062400, 1325988036172800, 53721616851302400, 2337607853957376000, 108727934847307776000, 5383304681800421376000, 282682783375630589952000
Offset: 0

Views

Author

Paul Barry, Sep 08 2004

Keywords

Crossrefs

Main diagonal of A094796.

Programs

  • Mathematica
    Table[(n!/2^n) Sum[Binomial[n, k] Binomial[2 (n - k), n] 3^k, {k, 0, Floor[n/2]}], {n, 0, 17}] (* Michael De Vlieger, Sep 14 2016 *)

Formula

a(n) = (n!/2^n)*A098453(n);
a(n) = (n!/2^n)*Sum_{k=0..floor(n/2)} binomial(n, k)*binomial(2*(n-k), n)*3^k.
D-finite with recurrence: a(n) +(1-2n)*a(n-1) -3(n-1)^2*a(n-2)=0. - R. J. Mathar, Dec 11 2011
a(n) = n! * A002426(n). - Anton Zakharov, Sep 14 2016

A190392 E.g.f. A(x) satisfies A'(x) = sin(A(x)) + cos(A(x)).

Original entry on oeis.org

1, 1, 0, -4, -12, 4, 240, 1184, -1008, -59504, -401280, 643136, 38584128, 323581504, -848090880, -51666451456, -509739310848, 2004840714496, 123888658698240, 1386061762251776, -7721141999864832, -483475390212586496, -5974101514137292800, 45231727252157947904
Offset: 1

Views

Author

Vladimir Kruchinin, May 09 2011

Keywords

Comments

Let f(x) be a smooth function. The autonomous differential equation A'(x) = f(A(x)), with initial condition A(0) = 0, is separable and the solution is given by A(x) = inverse function of Integral_{t = 0..x} 1/f(t) dt. The inversion of the integral Integral_{t = 0..x} 1/f(t) dt is most conveniently found by applying [Dominici, Theorem 4.1]. The result is A(x) = Sum_{n>=1} D^(n-1)[f](0)*x^n/n!, where the nested derivative D^n[f](x)is defined recursively as D^0[f](x) = 1 and D^(n+1)[f](x) = (d/dx)(f(x)*D^n[f](x)) for n >= 0. See A145271 for the coefficients in the expansion of D^n[f](x) in powers of f(x). In the present case we take f(x) = sin(x)+cos(x). - Peter Bala, Aug 27 2011

Crossrefs

Programs

  • Maple
    A := x ; for i from 1 to 35 do sin(A)+cos(A) ; convert(taylor(%,x=0,25),polynom) ; A := int(%,x) ; print(A) ; end do:
    for i from 1 to 25 do printf("%d,", coeftayl(A,x=0,i)*i!) ; end do: # R. J. Mathar, Jun 03 2011
  • Mathematica
    terms = 25; A[] = 0; Do[A[x] = Integrate[Sin[A[x]] + Cos[A[x]], x] + O[x]^terms, terms]; CoefficientList[A[x], x]*Range[0, terms-1]! (* Jean-François Alcover, Feb 21 2013, updated Jan 15 2018 *)
  • Maxima
    g(n):=(-1)^floor(n/2)*1/n!;
    a(n):=T190015_Solve(n,g);

Formula

E.g.f.: A(x) = inverse of Integral_{t = 0..x} 1/(sin(t)+cos(t)) dt = series reversion (x - x^2/2! + 3*x^3/3! - 11*x^4/4! + 57*x^5/5! - ...) = x + x^2/2! - 4*x^4/4! - 12*x^5/5! + .... a(n) = D^(n-1)[sin(x)+cos(x)](0), where the nested derivative operator D^n is defined above. Compare with A012244. -Peter Bala, Aug 27 2011
E.g.f.: A(x) = 2*arctan((sqrt(2)-1)*exp(sqrt(2)*x))-Pi/4. Compare with A028296. - Peter Bala, Sep 02 2011
G.f.: 1/G(0) where G(k) = 1 - 2*x*(k+1)/(1 + 1/(1 - 2*x*(k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 10 2013.
G.f.: -(1/x)/Q(0), where Q(k)= 2*k+1 - 1/x + (k+1)*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Apr 15 2013
G.f.: T(0)/(1-x), where T(k) = 1 - x^2*(k+1)^2/( x^2*(k+1)^2 + (1-x-2*x*k)*(1-3*x-2*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 17 2013
E.g.f. if offset 0: 2^(1/2)/(2^(1/2)*cosh(x*2^(1/2))-sinh(x*2^(1/2))). - Sergei N. Gladkovskii, Nov 10 2013
a(n) ~ -(n-1)! * 2^(3*n/2+1) * sin(n*arctan(Pi/log(3 - 2*sqrt(2)))) / (Pi^2 + log(3 - 2*sqrt(2))^2)^(n/2). - Vaclav Kotesovec, Jan 07 2014

A089975 Array read by ascending antidiagonals: T(n,k) is the number of n-letter words from a k-letter alphabet such that no letter appears more than twice.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 0, 4, 3, 1, 0, 0, 6, 9, 4, 1, 0, 0, 6, 24, 16, 5, 1, 0, 0, 0, 54, 60, 25, 6, 1, 0, 0, 0, 90, 204, 120, 36, 7, 1, 0, 0, 0, 90, 600, 540, 210, 49, 8, 1, 0, 0, 0, 0, 1440, 2220, 1170, 336, 64, 9, 1, 0, 0, 0, 0, 2520, 8100, 6120, 2226, 504, 81, 10, 1
Offset: 0

Views

Author

Paul Boddington, Nov 17 2003

Keywords

Examples

			Array begins:
  1, 1, 1,  1,    1,     1,      1,      1,       1,       1,       1, ...
  0, 1, 2,  3,    4,     5,      6,      7,       8,       9,      10, ...
  0, 1, 4,  9,   16,    25,     36,     49,      64,      81,     100, ...
  0, 0, 6, 24,   60,   120,    210,    336,     504,     720,     990, ...
  0, 0, 6, 54,  204,   540,   1170,   2226,    3864,    6264,    9630, ...
  0, 0, 0, 90,  600,  2220,   6120,  14070,   28560,   52920,   91440, ...
  0, 0, 0, 90, 1440,  8100,  29520,  83790,  201600,  430920,  842400, ...
  0, 0, 0,  0, 2520, 25200, 128520, 463680, 1345680, 3356640, 7484400, ...
  ... - _Robert FERREOL_, Nov 03 2017
		

Crossrefs

T(1, k) = A001477(k); T(2, k) = A000290(k); T(3, k) = A007531(k); T(n, n) = A012244(n); T(n, n+1) = A036774(n); T(n, n+2) = A003692(n+1); T(2*n, n) = A000680(n); sum(T(n, k), n=0..2*k) = A003011(k); sum(T(r, n-r), r=0..n) = A089976(n).
See A141765 for an irregular triangle version : T(n,k)=A141765(k,n) for n <= 2k.

Programs

  • Maple
    T:=(n,k)->add(n!*k!/(n-2*i)!/i!/(k-n+i)!/2^i,i=max(0,n-k)..n/2):
    or
    T:=proc(n,k) option remember :if n=0 then 1 elif n=1 then k elif k=0 then 0 else T(n, k-1)+n*T(n-1, k-1)+binomial(n,2)*T(n-2, k-1) fi end:
    or
    T:=(n,k)-> n!*coeff((1 + x + x^2/2)^k, x,n):
    seq(seq(T(n-k,k),k=0..n),n=0..20);
    # Robert FERREOL, Nov 07 2017
  • Mathematica
    T[n_, k_] := Sum[n!*k!/(2^i*(n - 2 i)!*(k - n + i)!*i!), {i, Max[0, n - k], Floor[n/2]}];
    Table[T[n-k , k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 05 2017, after Robert FERREOL *)
  • Python
    from math import factorial as f
    def T(n,k):
        return sum(f(n)*f(k)//f(n-2*i)//f(i)//f(k-n+i)//2**i for i in range(max(0,n-k),n//2+1))
    [T(n-k,k) for n in range(21) for k in range(n+1)]
    # Robert FERREOL, Oct 17 2017

Formula

T(n, k) = T(n, k-1) + n*T(n-1, k-1) + binomial(n, 2)*T(n-2, k-1) for n >= 2 and k >= 1.
T(n, k) = Sum_{i=max(0,n-k)..floor(n/2)} n!*k!/(2^i*(n-2*i)!*(k-n+i)!*i!). - Robert FERREOL, Oct 30 2017
T(n,k) = (-1)^n*n!*2^(-n/2)*GegenbauerC(n, -k, 1/sqrt(2)) for k >= n. - Robert Israel, Nov 08 2017
G.f.: Sum({n>=0} T(n,k)x^n)=n!(1 + x + x^2/2)^k. See Walsh link. - Robert FERREOL, Nov 14 2017

A239368 Number of words of length n over the alphabet {0,...,n-1} that avoid the pattern 1111.

Original entry on oeis.org

1, 1, 4, 27, 252, 3020, 44220, 765030, 15269520, 345376080, 8730489600, 243911883600, 7463164262400, 248207881521600, 8915064168410400, 343923449355486000, 14182674669779616000, 622591172035376544000, 28986699477880400256000, 1426677017904959524704000
Offset: 0

Views

Author

Chad Brewbaker, Mar 17 2014

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, n^n,
         ((105*n^3-252*n^2+175*n-36) *a(n-1) -2*(n-1)^2 *a(n-2)
         +2*(5*n-2)*(n-1)^2*(n-2)^2*a(n-3)) / (4*(2*n-1)*(5*n-7)))
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Jul 20 2014

Formula

Recursion: see Maple program.

Extensions

a(8)-a(11) from Alois P. Heinz, Mar 17 2014
a(12)-a(19) from Alois P. Heinz, Jul 20 2014

A345125 Numerator of 4/(1 + 1^2/(3 + 2^2/(5 + 3^2/(7 + ... + (n-1)^2/(2*n-1) )))).

Original entry on oeis.org

0, 4, 3, 19, 160, 1744, 644, 2529, 183296, 3763456, 4317632, 54743776, 1013549056, 30594128896, 35618973952, 10392576224, 3111643512832, 123968232030208, 48501417558016, 1083228572868608, 4080033616887808, 188557135970304, 3781715948011520
Offset: 0

Views

Author

Seiichi Manyama, Sep 16 2021

Keywords

Comments

The limit of a(n)/A345259(n) is Pi.

Examples

			4/(1 + 1^2/(3 + 2^2/5)) = 19/6. So a(3) = 19.
0, 4, 3, 19/6, 160/51, 1744/555, 644/205, 2529/805, 183296/58345, ...
		

Crossrefs

Cf. A012244, A054765, A054766, A345259 (denominator).

Programs

  • Mathematica
    nmax = 25; Join[{0}, Table[4/(1 + ContinuedFractionK[j^2, (2*j + 1), {j, 1, k}]), {k, 0, nmax}] // Numerator] (* Vaclav Kotesovec, Sep 16 2021 *)
  • PARI
    a(n) = my(x=0); forstep(i=n, 2, -1, x = (i-1)^2/((2*i-1)+x);); if (n, numerator(4/(1+x)), numerator(x)); \\ Michel Marcus, Sep 16 2021

Formula

a(n)/A345259(n) = 4 * A054765(n)/A012244(n).

A345259 Denominator of 4/(1 + 1^2/(3 + 2^2/(5 + 3^2/(7 + ... + (n-1)^2/(2*n-1) )))).

Original entry on oeis.org

1, 1, 1, 6, 51, 555, 205, 805, 58345, 1197945, 1374345, 17425485, 322622685, 9738413685, 11337871545, 3308059755, 990466892415, 39460313827935, 15438480702645, 344802363740835, 1298715036217599, 60019600489849, 1203757572990973
Offset: 0

Views

Author

Seiichi Manyama, Sep 16 2021

Keywords

Comments

The limit of A345125(n)/a(n) is Pi.

Examples

			4/(1 + 1^2/(3 + 2^2/5)) = 19/6. So a(3) = 6.
0, 4, 3, 19/6, 160/51, 1744/555, 644/205, 2529/805, 183296/58345, ...
		

Crossrefs

Cf. A012244, A054765, A054766, A345125 (numerator).

Programs

  • Mathematica
    nmax = 25; Join[{1}, Table[4/(1 + ContinuedFractionK[j^2, (2*j + 1), {j, 1, k}]), {k, 0, nmax}] // Denominator] (* Vaclav Kotesovec, Sep 16 2021 *)
  • PARI
    a(n) = my(x=0); forstep(i=n, 2, -1, x = (i-1)^2/((2*i-1)+x);); if (n, denominator(4/(1+x)), denominator(x)); \\ Michel Marcus, Sep 16 2021

Formula

A345125(n)/a(n) = 4 * A054765(n)/A012244(n).
Showing 1-10 of 12 results. Next