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.

Previous Showing 31-40 of 48 results. Next

A175954 Unlabeled (cyclic) Motzkin numbers: number of ways of drawing any number of nonintersecting chords joining n unlabeled points equally spaced on a circle, up to rotations of the circle.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 12, 19, 46, 95, 230, 528, 1320, 3219, 8172, 20714, 53478, 138635, 363486, 957858, 2543476, 6788019, 18218772, 49120019, 133036406, 361736109, 987316658, 2703991820, 7429445752, 20473889133, 56579632732, 156766505691
Offset: 0

Views

Author

Max Alekseyev, Oct 29 2010

Keywords

Comments

Unlabeled version of A001006.
The number of such chord configurations on 2n vertices with n chords is given by A002995(n+1).

Crossrefs

Programs

  • Mathematica
    a1006[0] = 1; a1006[n_Integer] := a1006[n] = a1006[n-1] + Sum[a1006[k]* a1006[n -2-k], {k, 0, n-2}];
    a142150[n_] := n*(1 + (-1)^n)/4;
    a2426[n_] := Coefficient[(1 + x + x^2)^n, x, n];
    a[0] = 1; a[n_] := (1/n)*(a1006[n]+a142150[n]*a1006[n/2-1] + Sum[EulerPhi[ n/d]*a2426[d], {d, Most @ Divisors[n]}]);
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 02 2018, after Andrew Howroyd *)

Formula

For odd prime p, a(p) = (A001006(p) - 1)/p + 1.
a(n) = (1/n) * (A001006(n) + A142150(n) * A001006(n/2-1) + Sum{d|n, dA002426(d)). - Andrew Howroyd, Apr 01 2017

A185100 Dihedral unlabeled Motzkin numbers: number of ways of drawing any number of nonintersecting chords joining n unlabeled points equally spaced on a circle, up to rotations and reflections of the circle.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 11, 16, 36, 65, 150, 312, 756, 1743, 4353, 10732, 27489, 70379, 183866, 481952, 1277784, 3402661, 9126689, 24584870, 66567924, 180939737, 493801694, 1352203202, 3715137460, 10237545525, 28291018283, 78384998904, 217715672036, 606103034821, 1691020991782, 4727601528674, 13242641322252, 37162431389051, 104469244613429
Offset: 0

Views

Author

Max Alekseyev, Feb 07 2011

Keywords

Comments

Unlabeled version of A001006. Another version is given by A175954.
The number of ways of drawing exactly n chords joining 2n unlabeled points up to rotations and reflections is A006082(n+1). - Andrey Zabolotskiy, May 24 2018

Crossrefs

Cf. A001006 (labeled points), A175954 (up to rotations only), A175955, A005773, A006082.

Programs

  • Mathematica
    a1006[0] = 1; a1006[n_Integer] := a1006[n] = a1006[n - 1] + Sum[a1006[k]* a1006[n - 2 - k], {k, 0, n - 2}];
    a142150[n_] := n*(1 + (-1)^n)/4;
    a2426[n_] := Coefficient[(1 + x + x^2)^n, x, n];
    a175954[0] = 1; a175954[n_] := (1/n)*(a1006[n] + a142150[n]*a1006[n/2 - 1] + Sum[EulerPhi[n/d]*a2426[d], {d, Most @Divisors[n]}]);
    a5773[0] = 1; a5773[n_] := Sum[k/n*Sum[Binomial[n, j]*Binomial[j, 2*j - n - k], {j, 0, n}], {k, 1, n}];
    a[0] = 1;
    a[n_?OddQ] := With[{m = (n-1)/2}, (1/2)*(a175954[2*m + 1] + a5773[m + 1])];
    a[n_?EvenQ] := With[{m = n/2}, (1/4)*(2*a175954[2*m] + a5773[m] + a5773[m + 1] + a1006[m - 1])];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 02 2018, after Andrew Howroyd *)

Formula

a(2n+1) = (1/2) * (A175954(2n+1) + A005773(n+1)). - Andrew Howroyd, Apr 01 2017
a(2n) = (1/4) * (2 * A175954(2n) + A005773(n) + A005773(n+1) + A001006(n-1)) for n > 0. - Andrew Howroyd, Apr 01 2017

A225972 The number of binary pattern classes in the (2,n)-rectangular grid with 3 '1's and (2n-3) '0's: two patterns are in same class if one of them can be obtained by a reflection or 180-degree rotation of the other.

Original entry on oeis.org

0, 0, 1, 6, 14, 32, 55, 94, 140, 208, 285, 390, 506, 656, 819, 1022, 1240, 1504, 1785, 2118, 2470, 2880, 3311, 3806, 4324, 4912, 5525, 6214, 6930, 7728, 8555, 9470, 10416, 11456, 12529, 13702, 14910, 16224, 17575, 19038, 20540, 22160, 23821, 25606, 27434, 29392
Offset: 0

Views

Author

Yosu Yurramendi, May 26 2013

Keywords

Comments

Also the edge count of the n X n black bishop graph. - Eric W. Weisstein, Jun 26 2017

Crossrefs

Cf. A289179 (edge count of white bishop graph).

Programs

  • Magma
    [(1/4)*(Binomial(2*(n-1),3)+2*Binomial(n-2,1)*(1/2)*(1+(-1)^n)): n in [1..50]]; // Vincenzo Librandi, Sep 04 2013
  • Maple
    A225972:=n->(n-1)*(4*n^2-2*n-3*(-1)^n+3)/12; seq(A225972(n), n=0..40); # Wesley Ivan Hurt, Mar 02 2014
  • Mathematica
    Table[(n - 1)*(4*n^2 - 2*n - 3*(-1)^n + 3)/12, {n, 0, 40}] (* Bruno Berselli, May 29 2013 *)
    CoefficientList[Series[x^2 (1 + 4 x + x^2 + 2 x^3) / ((1 + x)^2 (1 - x)^4), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 04 2013 *)
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 1, 6, 14, 32, 55}, 20] (* Eric W. Weisstein, Jun 27 2017 *)
  • R
    a <- vector()
        for(n in 0:40) a[n] <- (1/4)*(choose(2*(n-1),3) + 2*choose(n-2,1)*(1/2)*(1+(-1)^n))
        a  # Yosu Yurramendi and María Merino, Aug 21 2013
    

Formula

a(n) = A000330(n) + A142150(n) = (n-1)*(4*n^2 - 2*n - 3*(-1)^n + 3)/12.
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) with n > 5, a(0)=0, a(1)=0, a(2)=1, a(3)=6, a(4)=14, a(5)=32.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 4*(n-4)*(-1)^n with n > 3, a(0)=0, a(1)=0, a(2)=1, a(3)=6.
G.f.: x^2*(1 + 4*x + x^2 + 2*x^3)/((1+x)^2*(1-x)^4). - Bruno Berselli, May 29 2013
a(n) = (1/4)*(binomial(2*(n-1),3) + 2*binomial(n-2,1)*(1/2)*(1+(-1)^n)). - Yosu Yurramendi and María Merino, Aug 21 2013
a(n) = A005993(n-2) + A199771(n-1), n >= 2. - Christopher Hunt Gribble, Mar 02 2014

Extensions

More terms from Vincenzo Librandi, Sep 04 2013

A301283 Coordination sequence for node of type V1 in "car" 2-D tiling (or net).

Original entry on oeis.org

1, 3, 6, 8, 12, 17, 18, 20, 26, 29, 29, 33, 39, 41, 41, 45, 52, 54, 52, 57, 66, 66, 63, 70, 79, 78, 75, 82, 92, 91, 86, 94, 106, 103, 97, 107, 119, 115, 109, 119, 132, 128, 120, 131, 146, 140, 131, 144, 159, 152, 143, 156, 172, 165, 154, 168, 186, 177, 165
Offset: 0

Views

Author

N. J. A. Sloane, Mar 23 2018

Keywords

Crossrefs

Cf. A301285.

Programs

  • PARI
    See Links section.

Formula

Conjectures from Colin Barker, Mar 30 2018: (Start)
G.f.: (1 + 2*x + 5*x^2 + 5*x^3 + 9*x^4 + 6*x^5 + 6*x^6 + 3*x^7 + x^8 - x^10) / ((1 - x)^2*(1 + x^2)^2*(1 + x + x^2)).
a(n) = a(n-1) - 2*a(n-2) + 3*a(n-3) - 2*a(n-4) + 3*a(n-5) - 2*a(n-6) + a(n-7) - a(n-8) for n>8.
(End)
Equivalent conjecture: 12*a(n) = 37*n+4*b(n)+6*(-1)^(n/2)*A142150(n+2)+3*c(n) for n>2, where b(n)=0,-1,1 (3-periodic, n>=0) and c(n) = -6,5,6,-5 (4-periodic, n>=0). - R. J. Mathar, Mar 31 2018

Extensions

More terms from Rémy Sigrist, Mar 28 2018

A175922 Period 5: repeat [1, 1, 2, -1, 2].

Original entry on oeis.org

1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2
Offset: 1

Views

Author

Jaroslav Krizek, Oct 17 2010

Keywords

Crossrefs

Programs

Formula

a(n) = 1 + (2/5)*(cos(2*n*Pi/5) + cos(4*n*Pi/5) - 2*cos(2*(n+1)*Pi/5) - sin((4*n+3)*Pi/10) + 2*sin((8*n+3)*Pi/10) + sin((8*n+1)*Pi/10)). - Wesley Ivan Hurt, Sep 27 2018
G.f.: x*(1 + x + 2*x^2 - x^3 + 2*x^4) / (1 - x^5). - Vincenzo Librandi, Sep 28 2018
a(n) = a(n-5). - Wesley Ivan Hurt, Jun 25 2022

Extensions

Edited by Joerg Arndt, Sep 16 2013

A257845 a(n) = floor(n/5) * (n mod 5).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 2, 4, 6, 8, 0, 3, 6, 9, 12, 0, 4, 8, 12, 16, 0, 5, 10, 15, 20, 0, 6, 12, 18, 24, 0, 7, 14, 21, 28, 0, 8, 16, 24, 32, 0, 9, 18, 27, 36, 0, 10, 20, 30, 40, 0, 11, 22, 33, 44, 0, 12, 24, 36, 48, 0, 13, 26, 39, 52, 0, 14, 28, 42, 56
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 5, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Mathematica
    LinearRecurrence[{0,0,0,0,2,0,0,0,0,-1},{0,0,0,0,0,0,1,2,3,4},80] (* Harvey P. Dale, Aug 15 2021 *)
  • PARI
    a(n,b=5)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0,0,0,0,0,0], Vec(x^6*(4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015

Formula

a(n) = 2*a(n-5)-a(n-10). - Colin Barker, May 11 2015
G.f.: x^6*(4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)^2). - Colin Barker, May 11 2015

A257849 a(n) = floor(n/9) * (n mod 9).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 2, 4, 6, 8, 10, 12, 14, 16, 0, 3, 6, 9, 12, 15, 18, 21, 24, 0, 4, 8, 12, 16, 20, 24, 28, 32, 0, 5, 10, 15, 20, 25, 30, 35, 40, 0, 6, 12, 18, 24, 30, 36, 42, 48, 0, 7, 14, 21, 28, 35, 42, 49, 56, 0, 8, 16, 24, 32, 40, 48, 56, 64, 0
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 9, multiply the last digit by the number with its last digit removed.
See A142150(n-1) for the base 2 analog, and A115273, A257844 - A257850 for the base 3 - base 10 variants.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Magma
    [Floor(n/9)*(n mod 9): n in [0..100]]; // Vincenzo Librandi, May 11 2015
    
  • Mathematica
    Table[Floor[n/9] Mod[n, 9], {n, 100}] (* Vincenzo Librandi, May 11 2015 *)
  • PARI
    A257849(n)=n\9*(n%9)
    
  • PARI
    concat([0,0,0,0,0,0,0,0,0,0], Vec(x^10*(8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2*(x^6+x^3+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
    
  • Python
    from math import prod
    def A257849(n): return prod(divmod(n,9)) # Chai Wah Wu, Jan 19 2023
  • Sage
    [floor(n/9)*(n % 9)  for n in (0..80)]; # Bruno Berselli, May 11 2015
    

Formula

a(n) = 2*a(n-9)-a(n-18). - Colin Barker, May 11 2015
G.f.: x^10*(8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2*(x^6+x^3+1)^2). - Colin Barker, May 11 2015

A350549 a(n) is the permanent of a square matrix M(n) whose general element M_{i,j} is defined by floor((j - i + 1)/2).

Original entry on oeis.org

1, 0, 0, -1, 2, 20, -120, -4608, 41952, 2325024, -34876800, -3133087200, 66120252480, 8258565859200, -239533775631360, -40631838221721600, 1532513262269767680, 335620705700380262400, -16054693916748370329600, -4428138916386119015424000, 261291002534430572648448000
Offset: 0

Views

Author

Stefano Spezia, Jan 04 2022

Keywords

Comments

The matrix M(n) is the n-th principal submatrix of the array A010751.
In the n X n matrix M(n): the zero element appears 2*n - 1 times; the positive integers k appears iff 0 < k < floor(n/2), 2*n - 1 - A040002(k-1) times; the negative integer k appears iff -k < ceiling(n/2), 2*n - 5 + 4*(k + 1) times.
det(M(n)) = 0, except for n = 3 for which det(M(3)) = -1.
The trace and the subdiagonal sum of the matrix M(n) are zero.
The antitrace of the matrix M(n) is A142150(n+1).
The superdiagonal sum of the matrix M(n) is equal to n - 1.
The sum of the elements of the matrix M(n) is A002620(n).

Examples

			For n = 3 the matrix M(3) is
     0, 1, 1
     0, 0, 1
    -1, 0, 0
with permanent a(3) = -1.
For n = 4 the matrix M(4) is
    0,  1,  1,  2
    0,  0,  1,  1
   -1,  0,  0,  1
   -1, -1,  0,  0
with permanent a(4) = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](
             Matrix(n, (i, j)-> floor((j-i+1)/2)))):
    seq(a(n), n=0..20);  # Alois P. Heinz, Jan 19 2022
  • Mathematica
    Join[{1},Table[Permanent[Table[Floor[(j-i+1)/2],{i,n},{j,n}]],{n,20}]]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, (j - i + 1)\2)); \\ Michel Marcus, Jan 04 2022
    
  • Python
    from sympy import Matrix
    def A350549(n): return 1 if n == 0 else Matrix(n,n,lambda i,j:(j-i+1)//2).per() # Chai Wah Wu, Jan 12 2022

A131360 a(4n) = a(4n+1) = 0, a(4n+2) = 2n, a(4n+3) = 2n+1.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 3, 0, 0, 4, 5, 0, 0, 6, 7, 0, 0, 8, 9, 0, 0, 10, 11, 0, 0, 12, 13, 0, 0, 14, 15, 0, 0, 16, 17, 0, 0, 18, 19, 0, 0, 20, 21, 0, 0, 22, 23, 0, 0, 24, 25, 0, 0, 26, 27, 0, 0, 28, 29, 0, 0, 30, 31, 0, 0, 32, 33, 0, 0, 34, 35, 0, 0, 36, 37, 0, 0, 38, 39, 0, 0, 40, 41, 0, 0, 42, 43
Offset: 0

Views

Author

Paul Curtz, Sep 30 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Array[Floor[(# - 1)/2] Floor[Mod[#, 4]/2] &, 88, 0] (* Michael De Vlieger, Sep 22 2021 *)
  • PARI
    concat(vector(3), Vec(x^3*(x^3+x^2-x+1)/((x-1)^2*(x+1)*(x^2+1)^2) + O(x^100))) \\ Colin Barker, Jul 01 2015

Formula

G.f.: x^3*(x^3+x^2-x+1) / ((x-1)^2*(x+1)*(x^2+1)^2). - Colin Barker, Jul 01 2015
a(n) = (cos(n*Pi/2)+sin(n*Pi/2)-1)*((2n-3)*cos(n*Pi/2)+cos(n*Pi)+(2n-3)*sin(n*Pi/2))/8. - Wesley Ivan Hurt, Sep 24 2017
a(n) = floor((n-1)/2)*A021913(n). - Lechoslaw Ratajczak, Sep 22 2021

A175921 Period 5: repeat [1, 2, 2, -1, 1].

Original entry on oeis.org

1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1, 1
Offset: 1

Views

Author

Jaroslav Krizek, Oct 17 2010

Keywords

Crossrefs

Programs

Extensions

Edited by Joerg Arndt, Sep 16 2013
Previous Showing 31-40 of 48 results. Next