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 21-30 of 35 results. Next

A343559 Irregular triangle read by rows: the n-th row gives the column indices of the consecutive elements of the spiral of the n X n matrix defined in A126224.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Apr 19 2021

Keywords

Examples

			The triangle begins
1
1   2   2   1
1   2   3   3   3   2   1   1   2
1   2   3   4   4   4   4   3   2   1   1   1   2   3   3   2
...
		

Crossrefs

Cf. A000290 (row length), A002265, A002411 (row sums), A010873, A060747, A126224, A343558 (row indices).

Programs

  • Mathematica
    a:={};nmax:=6;For[n=1,n<=nmax,n++,For[s=1,s<=2n-1,s++,If[OddQ[s]&&Mod[s,4]==1 ,k=Floor[s/4];For[i=1,i<=Ceiling[n-s/2],i++,AppendTo[a,k+i]];k=+Floor[s/4]+Ceiling[n-s/2],If[EvenQ[s],For[i=1,i<=Ceiling[n-s/2],i++,AppendTo[a,k]],For[i=1,i<=Ceiling[n-s/2],i++,AppendTo[a,k-i]];k=k-i+1]]]]; a

A343853 Irregular triangle read by rows: the n-th row gives the row indices of the matrix of 1..n^2 filled successively back and forth along antidiagonals.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, May 01 2021

Keywords

Examples

			The triangle begins:
1
1   1   2   2
1   1   2   3   2   1   2   3   3
1   1   2   3   2   1   1   2   3   4   4   3   2   3   4   4
...
		

Crossrefs

Cf. A000290 (row length), A002411 (row sums), A060747 (number of antidiagonals), A078475, A319573, A343854 (column indices).

Programs

  • Mathematica
    a={};For[n=1,n<=6,n++,For[d=1,d<=n,d++, If[OddQ[d],i=d;For [k=1,k<=d,k++, AppendTo[a,i-k+1]],i=1;For[k=1,k<=d,k++, AppendTo[a,i+k-1]]]];For[d=n+1,d<=2n-1,d++, If[OddQ[d],i= n; For[k=1,k<=2n-d,k++,AppendTo[a,i-k+1]],If[EvenQ[d],i=d-n+1;For[k=1,k<=2n-d,k++, AppendTo[a,i+k-1]]]]]]; a

A343854 Irregular triangle read by rows: the n-th row gives the column indices of the matrix of 1..n^2 filled successively back and forth along antidiagonals.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, May 01 2021

Keywords

Examples

			The triangle begins:
1
1   2   1   2
1   2   1   1   2   3   3   2   3
1   2   1   1   2   3   4   3   2   1   2   3   4   4   3   4
...
		

Crossrefs

Cf. A000290 (row length), A002411 (row sums), A060747 (number of antidiagonals), A078475, A319572, A343853 (row indices).

Programs

  • Mathematica
    a={};For[n=1,n<=6,n++,For[d=1,d<=n,d++, If[EvenQ[d],i=d;For [k=1,k<=d,k++, AppendTo[a,i-k+1]],i=1;For[k=1,k<=d,k++, AppendTo[a,i+k-1]]]];For[d=n+1,d<=2n-1,d++, If[EvenQ[d],i= n; For[k=1,k<=2n-d,k++,AppendTo[a,i-k+1]],If[OddQ[d],i=d-n+1;For[k=1,k<=2n-d,k++, AppendTo[a,i+k-1]]]]]]; a

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

A193251 Small rhombicosidodecahedron with faces of centered polygons.

Original entry on oeis.org

1, 123, 605, 1687, 3609, 6611, 10933, 16815, 24497, 34219, 46221, 60743, 78025, 98307, 121829, 148831, 179553, 214235, 253117, 296439, 344441, 397363, 455445, 518927, 588049, 663051, 744173, 831655, 925737, 1026659, 1134661, 1249983, 1372865, 1503547, 1642269
Offset: 1

Views

Author

Craig Ferguson, Jul 19 2011

Keywords

Comments

The sequence starts with a central dot and expands outward with (n-1) centered polygonal pyramids producing a small rhombicosidodecahedron. Each iteration requires the addition of (n-2) edges and (n-1) vertices to complete the centered polygon of each face. [centered triangles (A005448), centered squares (A001844) and centered pentagons (A005891)]

Crossrefs

Programs

Formula

a(n) = 40*n^3 - 60*n^2 + 22*n - 1.
G.f.: x*(1+x)*(x^2 + 118*x + 1)/(x-1)^4. - R. J. Mathar, Aug 26 2011
From Elmo R. Oliveira, Aug 22 2025: (Start)
E.g.f.: 1 + exp(x)*(-1 + 2*x + 60*x^2 + 40*x^3).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 4.
a(n) = A060747(n)*A195317(n). (End)

A195662 Triangle T(n,k) read by rows: T(0,0)= -3, T(1,0)= 2, T(1,1) = 0 and T(n,k) = T(n-1,k) -T(n-2,k-2) otherwise.

Original entry on oeis.org

-3, 2, 0, 2, 0, 3, 2, 0, 1, 0, 2, 0, -1, 0, -3, 2, 0, -3, 0, -4, 0, 2, 0, -5, 0, -3, 0, 3, 2, 0, -7, 0, 0, 0, 7, 0, 2, 0, -9, 0, 5, 0, 10, 0, -3, 2, 0, -11, 0, 12, 0, 10, 0, -10, 0, 2, 0, -13, 0, 21, 0, 5, 0, -20, 0, 3, 2, 0, -15, 0, 32, 0, -7, 0, -30, 0, 13, 0
Offset: 0

Views

Author

Paul Curtz, Sep 22 2011

Keywords

Comments

In the notation of A195673, this defines polynomials P(n,x,p=-3,q=2), where p and q are the values of the constant and linear order for n=0 and 1.
Row sums -- the value P(n,1,-3,2) of the polynomial -- are A130848(n+5).
For general seed values in the two top rows of the triangle, the recurrence T(n,k) = T(n-1,k) - T(n-2,k-2) defines the triangle
p;
q, 0;
q, 0, -p;
q, 0, -p-q, 0;
q, 0, -p-2q, 0, p;
q, 0, -p-3q, 0, 2p+q, 0;
and a companion triangle by adding 1 to both seed values:
p+1;
q+1, 0;
q+1, 0, -p-1;
q+1, 0, -p-q-2, 0;
q+1, 0, -p-2q-3, 0, p+1;
q+1, 0, -p-3q-4, 0, 2p+q+3, 0;
The point-by-point difference between two companions is P(n,x,p+1,q+1) - P(n,x,p,q) = S(n,x) as represented (with increasing exponents) by A053119.
Examples of such triangles are A053119 (p=q=1), A192575 (p=1, q=2),
A162514 (p=2, q=1, up to a sign factor), A192011 (p=-1, q=2), A135929 (p=-2, q=1, apart from a irregular leading T(0,0)).

Examples

			The first few rows are
-3;
2, 0;
2, 0,   3;
2, 0,   1, 0;
2, 0,  -1, 0, -3;
2, 0,  -3, 0, -4, 0;
2, 0,  -5, 0, -3, 0,  3;
2, 0,  -7, 0,  0, 0,  7, 0;
2, 0,  -9, 0,  5, 0, 10, 0,  -3;
2, 0, -11, 0, 12, 0, 10, 0, -10, 0;
2, 0, -13, 0, 21, 0,  5, 0, -20, 0, 3;
		

Crossrefs

Programs

  • Mathematica
    p = -3; q = 2; t[0, 0] = p; t[, 0] = q; t[, ?OddQ] = 0; t[n, k_] /; k > n = 0; t[n_ /; n >= 0, k_ /; k >= 0] := t[n, k] = t[n-1, k] - t[n-2, k-2]; Table[t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 27 2012 *)

Formula

T(n,0) = 2 (n>0).
T(n,2) = -A060747(n-3), n>2.
T(n,4) = A028347(n-5), n>6.
T(2n,2n) = -3*(-1)^n ; T(n, 2k-1) = 0 ; T(2n+1,2n) = -(3n-2)*(-1)^n. - M. F. Hasler, Sep 28 2011

A215415 a(2*n) = n, a(4*n+1) = 2*n-1, a(4*n+3) = 2*n+3.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Aug 09 2012

Keywords

Comments

a(n) and higher order differences in further rows:
0, -1, 1, 3, 2, 1,
-1, 2, 2, -1, -1, -2, A134430(n).
3, 0, -3, 0, 3, 0,
-3, -3, 3, 3, -3, -3,
0, 6, 0, -6, 0, 6,
6, -6, -6, 6, 6, -6.
a(n) is the binomial transform of 0, -1, 3, -3, 0, 6, -12, 12, 0, -24, 48, -48, 0, 96..., essentially negated A134813.
By definition, all differences a(n+k)-a(n) are periodic sequences with period length 4. For k=1, 3 and 4 these are A134430, A021307 and A007395, for example.

Crossrefs

Quadrisections: A005843, A060747, A005408, A144396.

Programs

  • Mathematica
    Flatten[Table[{2n, 2n - 1, 2n + 1, 2n + 3}, {n, 0, 19}]] (* Alonso del Arte, Aug 09 2012 *)
  • PARI
    a(n) = ((-3*I)*((-I)^n-I^n)+2*n)/4 \\ Colin Barker, Oct 19 2015
    
  • PARI
    concat(0, Vec(-x*(1-3*x+x^2)/((x^2+1)*(x-1)^2) + O(x^100))) \\ Colin Barker, Oct 19 2015

Formula

a(2*n) = n, a(2*n+1) = A097062(n+1).
a(n) = (A214297(n+1) - A214297(n-1))/2.
a(3*n) =3*A004525(n).
a(n) = +2*a(n-1) -2*a(n-2) +2*a(n-3) -a(n-4).
G.f. -x*(1-3*x+x^2) / ( (x^2+1)*(x-1)^2 ). - R. J. Mathar, Aug 11 2012
a(n) = ((-3*I)*((-I)^n-I^n)+2*n)/4. - Colin Barker, Oct 19 2015

A380747 Array read by ascending antidiagonals: A(n,k) = [x^n] (1 - x)/(1 - k*x)^2.

Original entry on oeis.org

1, -1, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 8, 5, 1, 0, 1, 20, 21, 7, 1, 0, 1, 48, 81, 40, 9, 1, 0, 1, 112, 297, 208, 65, 11, 1, 0, 1, 256, 1053, 1024, 425, 96, 13, 1, 0, 1, 576, 3645, 4864, 2625, 756, 133, 15, 1, 0, 1, 1280, 12393, 22528, 15625, 5616, 1225, 176, 17, 1
Offset: 0

Views

Author

Stefano Spezia, Jan 31 2025

Keywords

Examples

			The array begins as:
   1, 1,   1,    1,     1,     1, ...
  -1, 1,   3,    5,     7,     9, ...
   0, 1,   8,   21,    40,    65, ...
   0, 1,  20,   81,   208,   425, ...
   0, 1,  48,  297,  1024,  2625, ...
   0, 1, 112, 1053,  4864, 15625, ...
   0, 1, 256, 3645, 22528, 90625, ...
   ...
		

Crossrefs

Cf. A000012 (k=1 or n=0), A000567 (n=2), A001792 (k=2), A007778, A060747 (n=1), A081038 (k=3), A081039 (k=4), A081040 (k=5), A081041 (k=6), A081042 (k=7), A081043 (k=8), A081044 (k=9), A081045 (k=10), A103532, A154955, A380748 (antidiagonal sums).

Programs

  • Mathematica
    A[0,0]:=1; A[1,0]:=-1; A[n_,k_]:=((k-1)*n+k)k^(n-1); Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=SeriesCoefficient[(1-x)/(1-k*x)^2,{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=n!SeriesCoefficient[Exp[k*x](1+(k-1)*x),{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten

Formula

A(n,k) = ((k - 1)*n + k)*k^(n-1) with A(0,0) = 1.
A(n,k) = n! * [x^n] exp(k*x)*(1 + (k - 1)*x).
A(n,0) = A154955(n+1).
A(3,n) = A103532(n-1) for n > 0.
A(n,n) = A007778(n) for n > 0.

A381059 Array read by ascending antidiagonals: A(n,k) = numerator(binomial(n-1/2,k)) with k >=0.

Original entry on oeis.org

1, 1, -1, 1, 1, 3, 1, 3, -1, -5, 1, 5, 3, 1, 35, 1, 7, 15, -1, -5, -63, 1, 9, 35, 5, 3, 7, 231, 1, 11, 63, 35, -5, -3, -21, -429, 1, 13, 99, 105, 35, 3, 7, 33, 6435, 1, 15, 143, 231, 315, -7, -5, -9, -429, -12155, 1, 17, 195, 429, 1155, 63, 7, 5, 99, 715, 46189
Offset: 0

Views

Author

Stefano Spezia, Feb 12 2025

Keywords

Comments

Numerators of the binomial coefficients for half-integers. The denominators are given by the absolute values of A173755.

Examples

			The array of the binomial coefficients for half-integers begins as:
  1, -1/2,  3/8,  -5/16,   35/128, -63/256, ...
  1,  1/2, -1/8,   1/16,   -5/128,   7/256, ...
  1,  3/2,  3/8,  -1/16,    3/128,  -3/256, ...
  1,  5/2, 15/8,   5/16,   -5/128,   3/256, ...
  1,  7/2, 35/8,  35/16,   35/128,  -7/256, ...
  1,  9/2, 63/8, 105/16,  315/128,  63/256, ...
  1, 11/2, 99/8, 231/16, 1155/128, 693/256, ...
  ...
		

Crossrefs

Columns k=0..1 give A000012, A060747.
Row n=1 gives A002596.
Main diagonal gives A001790.

Programs

  • Mathematica
    A[n_,k_]:=Numerator[Binomial[n-1/2,k]]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=Numerator[(2n-1)!!/((2(n-k)-1)!!2^k k!)]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten

Formula

A(n,k) = numerator((2*n - 1)!!/((2*(n - k) - 1)!!*2^k*k!)).
A(n,2) = A000466(n-1) for n > 0.
A(n,3) = A162540(n-3) for n > 3.
A(0,n) = (-1)^n*A001790(n).
abs(A(2,n)) = abs(A161200(n)).
abs(A(3,n)) = abs(A161202(n)).

A084847 a(n) = 2*3^n+2^(2n-1)*(n-2).

Original entry on oeis.org

1, 4, 18, 86, 418, 2022, 9650, 45334, 209730, 956870, 4312402, 19228662, 84948962, 372287398, 1620178674, 7008019670, 30150864514, 129107299206, 550530654866, 2338786731958, 9902578218786, 41802362561894, 175984622563378
Offset: 0

Views

Author

Paul Barry, Jun 09 2003

Keywords

Comments

Binomial transform of A084643. Third binomial transform of abs(A060747).

Crossrefs

Formula

G.f.: (1-7x+14x^2)/((1-3x)(1-4x)^2).
Previous Showing 21-30 of 35 results. Next