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

A266969 Integers k such that A001006(k) is divisible by k.

Original entry on oeis.org

1, 2, 21, 266, 387, 657, 1314, 6291, 16113, 25767, 27594, 41902, 54243, 55314, 56457, 89018, 96141, 155601, 172746, 219842, 294273, 300871, 384426, 412398, 453781, 579474, 653421, 660879, 669609, 951881, 993307, 1117338, 1246077, 1401258, 1438623, 1535409, 1870533
Offset: 1

Views

Author

Altug Alkan, Jan 07 2016

Keywords

Comments

Integers n such that number of ways of drawing any number of nonintersecting chords joining n (labeled) points on a circle is divisible by n.
Corresponding values of A001006(n)/n are 1, 1, 6787979, ...

Examples

			There are 142547559 ways to join 21 points on a circle by nonintersecting chords. Because of the fact that 142547559 is divisible by 21, 21 is a term of this sequence.
		

Crossrefs

Programs

  • Mathematica
    lim = 100000; t = CoefficientList[Series[(1 - x - (1 - 2 x - 3 x^2)^(1/2))/(2 x^2), {x, 0, lim}], x]; Select[Range@ lim, Divisible[t[[# + 1]], #] &] (* Michael De Vlieger, Jan 09 2016, after Jean-François Alcover at A001006 *)
    seq[kmax_] := Module[{mot1 = 1, mot2 = 2, mot, s = {1, 2}}, Do[mot3 = ((2*k+1)*mot2 + (3*k-3)*mot1)/(k+2); If[Divisible[mot3, k], AppendTo[s, k]]; mot1 = mot2; mot2 = mot3, {k, 3, kmax}]; s]; seq[10^5] (* Amiram Eldar, May 12 2024 *)
  • PARI
    lista(kmax) = {my(mot1 = 1, mot2 = 2, mot); print1(1, ", ", 2, ", "); for(k = 3, kmax, mot3 = ((2*k+1)*mot2 + (3*k-3)*mot1)/(k+2); if(!(mot3 % k), print1(k,", ")); mot1 = mot2; mot2 = mot3);} \\ Amiram Eldar, May 12 2024

Extensions

a(8)-a(17) from Michael De Vlieger, Jan 09 2016
a(18)-a(37) from Amiram Eldar, May 12 2024

A114422 Riordan array (1/sqrt(1-2*x-3*x^2), M(x)-1) where M(x) is the g.f. of the Motzkin numbers A001006.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 7, 9, 5, 1, 19, 26, 19, 7, 1, 51, 75, 65, 33, 9, 1, 141, 216, 211, 132, 51, 11, 1, 393, 623, 665, 483, 235, 73, 13, 1, 1107, 1800, 2058, 1674, 963, 382, 99, 15, 1, 3139, 5211, 6294, 5598, 3663, 1739, 581, 129, 17, 1, 8953, 15115, 19095, 18261, 13243
Offset: 0

Views

Author

Paul Barry, Feb 12 2006

Keywords

Comments

First column is central trinomial numbers A002426.
Second column is A005774.
Third column is A025568.
Row sums are A116387.
Diagonal sums are A116388.
Product of A007318 and A116382.
Column k has e.g.f. exp(x)*Sum_{j=0..k} C(k,j)*Bessel_I(k+j,2*x).

Examples

			Triangle begins
1,
1, 1,
3, 3, 1,
7, 9, 5, 1,
19, 26, 19, 7, 1,
51, 75, 65, 33, 9, 1,
141, 216, 211, 132, 51, 11, 1
		

Programs

  • GAP
    T:=Flat(List([0..10], n->List([0..n], k->Sum([0..n], j-> Binomial(n, j-k)*Binomial(j, n-j))))); # G. C. Greubel, Dec 15 2018
  • Magma
    [[(&+[Binomial(n, j-k)*Binomial(j, n-j): j in [0..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Dec 15 2018
    
  • Mathematica
    T[n_, k_] := Sum[Binomial[n, j - k]*Binomial[j, n - j], {j,0,n}]; Table[T[n, k], {n,0,10}, {k,0,n}] // Flatten (* G. C. Greubel, Feb 28 2017 *)
  • PARI
    {T(n,k) = sum(j=0,n, binomial(n, j-k)*binomial(j, n-j))};
    for(n=0, 10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Dec 15 2018
    
  • Sage
    [[sum(binomial(n, j-k)*binomial(j, n-j) for j in range(n+1)) for k in range(n+1)] for n in range(10)] # G. C. Greubel, Dec 15 2018
    

Formula

Riordan array (1/sqrt(1-2*x-3*x^2), (1-x-2*x^2-sqrt(1-2*x-3*x^2) ) / (2*x^2)).
Number triangle T(n,k) = Sum_{j=0..n} C(n,j-k)*C(j,n-j).

A039964 Motzkin numbers A001006 read mod 3.

Original entry on oeis.org

1, 1, 2, 1, 0, 0, 0, 1, 2, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 2, 1, 0, 0, 0, 1, 2, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 2, 1, 0, 0, 0, 1, 2, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

An example of a d-perfect sequence.
The asymptotic mean of this sequence is 0 (Burns, 2016). - Amiram Eldar, Jan 30 2021

Crossrefs

Cf. A001006.
Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.

Programs

  • Mathematica
    b = DifferenceRoot[Function[{b, n}, {3 (n + 1) b[n] + (2 n + 5) b[n + 1] == (n + 4) b[n + 2], b[0] == 1, b[1] == 1}]];
    a[n_] := Mod[b[n], 3];
    Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Feb 26 2019 *)
  • PARI
    a001006(n) = polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/(2*x^2), n);
    vector(200, n, n--; a001006(n) % 3) \\ Altug Alkan, Oct 23 2015

Formula

a(n) = A001006(n) mod 3. - Christian G. Bower, Jun 12 2005

Extensions

More terms from Christian G. Bower, Jun 12 2005
Offset adapted by Altug Alkan, Oct 23 2015

A258710 Motzkin numbers A001006 read mod 11.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 14 2015

Keywords

Crossrefs

Cf. A001006.
Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.

Programs

  • Mathematica
    m[0] = 1; m[n_] := m[n] = m[n-1] + Sum[m[k] m[n-k-2], {k, 0, n-2}];
    a[n_] := Mod[m[n], 11];
    Array[a, 100, 0] (* Jean-François Alcover, Nov 05 2018 *)

A258711 Motzkin numbers A001006 read mod 7.

Original entry on oeis.org

1, 1, 2, 4, 2, 0, 2, 1, 1, 2, 4, 2, 6, 3, 3, 3, 6, 5, 6, 5, 1, 0, 0, 0, 0, 0, 1, 6, 5, 5, 3, 6, 3, 5, 5, 2, 2, 4, 1, 4, 4, 0, 1, 1, 2, 4, 2, 0, 2, 1, 1, 2, 4, 2, 0, 2, 1, 1, 2, 4, 2, 6, 3, 3, 3, 6, 5, 6, 5, 1, 0, 0, 0, 0, 0, 1, 6, 5, 5, 3, 6, 3, 5, 5, 2, 2, 4, 1, 4
Offset: 0

Views

Author

N. J. A. Sloane, Jun 14 2015

Keywords

Crossrefs

Cf. A001006.
Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.

Programs

  • Mathematica
    m[0] = 1; m[n_] := m[n] = m[n-1] + Sum[m[k] m[n-k-2], {k, 0, n-2}];
    a[n_] := Mod[m[n], 7];
    Array[a, 100, 0] (* Jean-François Alcover, Nov 05 2018 *)
  • PARI
    a001006(n) = polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/(2*x^2), n);
    vector(200, n, n--; a001006(n) % 7) \\ Altug Alkan, Oct 23 2015

A258712 Motzkin numbers A001006 read mod 5.

Original entry on oeis.org

1, 1, 2, 4, 4, 1, 1, 2, 3, 0, 3, 3, 1, 0, 4, 2, 2, 4, 2, 4, 4, 4, 3, 0, 2, 1, 1, 2, 4, 4, 1, 1, 2, 3, 0, 3, 3, 1, 0, 4, 2, 2, 4, 2, 4, 4, 4, 3, 4, 3, 3, 3, 1, 2, 2, 3, 3, 1, 4, 0, 4, 4, 3, 0, 2, 1, 1, 2, 1, 2, 2, 2, 4, 3, 3, 2, 2, 4, 3, 3, 2, 2, 4, 1, 0, 1, 1, 2, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jun 14 2015

Keywords

Crossrefs

Cf. A001006.
Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.

Programs

  • Mathematica
    b = DifferenceRoot[Function[{b, n}, {3 (n + 1) b[n] + (2 n + 5) b[n + 1] == (n + 4) b[n + 2], b[0] == 1, b[1] == 1}]];
    a[n_] := Mod[b[n], 5];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 26 2019 *)
  • PARI
    a001006(n) = polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/(2*x^2), n);
    vector(200, n, n--; a001006(n) % 5) \\ Altug Alkan, Oct 23 2015

A299918 Motzkin numbers (A001006) mod 8.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 16 2018

Keywords

Crossrefs

Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.

Programs

  • Maple
    f:= rectoproc({(3+3*n)*a(n)+(5+2*n)*a(1+n)+(-4-n)*a(n+2), a(0) = 1, a(1) = 1}, a(n), remember): seq(f(n) mod 8, n=0..200); # Robert Israel, Mar 16 2018
  • Mathematica
    Table[Mod[GegenbauerC[n, -n - 1, -1/2] / (n + 1), 8], {n, 0, 100}] (* Vincenzo Librandi, Sep 08 2018 *)
  • PARI
    catalan(n) = binomial(2*n, n)/(n+1);
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n, k)*catalan(k+1)) % 8; \\ Michel Marcus, May 23 2022

A299919 Motzkin numbers (A001006) mod 4.

Original entry on oeis.org

1, 1, 2, 0, 1, 1, 3, 3, 3, 3, 0, 2, 3, 3, 2, 0, 3, 3, 2, 0, 3, 3, 3, 3, 1, 1, 0, 2, 1, 1, 3, 3, 3, 3, 2, 0, 3, 3, 1, 1, 1, 1, 0, 2, 1, 1, 0, 2, 1, 1, 2, 0, 1, 1, 1, 1, 3, 3, 0, 2, 3, 3, 2, 0, 3, 3, 2, 0, 3, 3, 1, 1, 1, 1, 0, 2, 1, 1, 2, 0, 1, 1, 2, 0, 1
Offset: 0

Views

Author

N. J. A. Sloane, Mar 16 2018

Keywords

Crossrefs

Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.

Programs

  • Maple
    f:= rectoproc({(3+3*n)*a(n)+(5+2*n)*a(1+n)+(-4-n)*a(n+2), a(0) = 1, a(1) = 1},a(n),remember):
    seq(f(n) mod 4, n=0..200); # Robert Israel, Mar 16 2018
  • Mathematica
    b = DifferenceRoot[Function[{b, n}, {3(n+1) b[n] + (2n+5) b[n+1] == (n+4) b[n+2], b[0] == 1, b[1] == 1}]];
    a[n_] := Mod[b[n], 4];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 26 2019 *)

A299920 Motzkin numbers (A001006) mod 6.

Original entry on oeis.org

1, 1, 2, 4, 3, 3, 3, 1, 5, 1, 4, 2, 1, 3, 0, 0, 3, 3, 0, 0, 3, 3, 3, 3, 3, 1, 2, 4, 1, 5, 1, 3, 3, 3, 4, 2, 1, 1, 5, 1, 3, 3, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 3, 3, 0, 0, 3, 3, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0, 3, 3, 0, 4, 5, 1, 4, 2, 1, 3
Offset: 0

Views

Author

N. J. A. Sloane, Mar 16 2018

Keywords

Crossrefs

Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.

Programs

  • Maple
    f:= gfun:-rectoproc({(3+3*n)*a(n)+(5+2*n)*a(1+n)+(-4-n)*a(n+2), a(0) = 1, a(1) = 1},a(n),remember):
    seq(f(n) mod 6, n=0..100); # Robert Israel, Mar 16 2018
  • Mathematica
    b = DifferenceRoot[Function[{b, n}, {3 (n + 1) b[n] + (2 n + 5) b[n + 1] == (n + 4) b[n + 2], b[0] == 1, b[1] == 1}]];
    a[n_] := Mod[b[n], 6];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 26 2019 *)

A187306 Alternating sum of Motzkin numbers A001006.

Original entry on oeis.org

1, 0, 2, 2, 7, 14, 37, 90, 233, 602, 1586, 4212, 11299, 30536, 83098, 227474, 625993, 1730786, 4805596, 13393688, 37458331, 105089228, 295673995, 834086420, 2358641377, 6684761124, 18985057352, 54022715450, 154000562759, 439742222070, 1257643249141
Offset: 0

Views

Author

Paul Barry, Mar 08 2011

Keywords

Comments

Diagonal sums of A089942.
Hankel transform is A187307.
Also gives the number of simple permutations of each length that avoid the pattern 321 (i.e., are the union of two increasing sequences, and in one line notation contain no nontrivial block of values which form an interval). There are 2 such permutations of length 4, 2 of length 5, etc. - Michael Albert, Jun 20 2012
Convolution of A005043 with itself. - Philippe Deléham, Jan 28 2014
From Gus Wiseman, Nov 15 2022: (Start)
Conjecture: Also the number of topologically series-reduced ordered rooted trees with n + 2 vertices. This would imply a(n) = A284778(n-1) + A005043(n). For example, the a(0) = 1 through a(5) = 14 trees are:
(o) . (ooo) (oooo) (ooooo) (oooooo)
((oo)) ((ooo)) ((oo)oo) ((oo)ooo)
((oooo)) ((ooo)oo)
(o(oo)o) ((ooooo))
(oo(oo)) (o(oo)oo)
(((oo)o)) (o(ooo)o)
((o(oo))) (oo(oo)o)
(oo(ooo))
(ooo(oo))
(((oo)oo))
(((ooo)o))
((o(oo)o))
((o(ooo)))
((oo(oo)))
(End)

Crossrefs

Programs

  • Maple
    a := n -> (-1)^n*(1-hypergeom([1/2,-n-1],[2],4));
    seq(round(evalf(a(n),99)),n=0..30); # Peter Luschny, Sep 25 2014
  • Mathematica
    CoefficientList[Series[(1-x-Sqrt[1-2x-3x^2])/(2x^2(1+x)), {x,0,30}], x] (* Harvey P. Dale, Jun 14 2011 *)
  • PARI
    x='x+O('x^66); Vec((1-x-sqrt(1-2*x-3*x^2))/(2*x^2*(1+x))) /* Joerg Arndt, Mar 07 2013 */
    
  • PARI
    Vec(serreverse(x*(1-x)/(1-x+x^2) + O(x^30))^2) \\ Andrew Howroyd, Apr 28 2018
    
  • Sage
    def A187306():
        a, b, n = 1, 0, 1
        yield a
        while True:
            n += 1
            a, b = b, (2*b+3*a)*(n-1)/(n+1)
            yield b - (-1)^n
    A187306_list = A187306()
    [next(A187306_list) for i in range(20)] # Peter Luschny, Sep 25 2014

Formula

G.f.: (1-x-sqrt(1-2*x-3*x^2))/(2*x^2*(1+x)).
a(n) = sum(k=0..n, A001006(k)*(-1)^(n-k)).
D-finite with recurrence -(n+2)*a(n) +(n-1)*a(n-1) +(5*n-2)*a(n-2) +3*(n-1)a(n-3)=0. - R. J. Mathar, Nov 17 2011
a(n) = (2*sum(j=0..n, C(2*j+1,j+1)*(-1)^(n-j)*C(n+2,j+2)))/(n+2). - Vladimir Kruchinin, Feb 06 2013
a(n) ~ 3^(n+5/2)/(8*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Aug 15 2013
a(n) = (-1)^n*(1-hypergeom([1/2,-n-1],[2],4)). - Peter Luschny, Sep 25 2014
a(n) = A005043(n+1) + (-1)^n. - Peter Luschny, Sep 25 2014
G.f.: (1/(1 - x^2/(1 - x - x^2/(1 - x - x^2/(1 - x - x^2/(1 - ...))))))^2, a continued fraction. - Ilya Gutkovskiy, Sep 23 2017
Showing 1-10 of 590 results. Next