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-38 of 38 results.

A187297 Number of 2-step one space leftwards or up, two space rightwards or down asymmetric rook's tours on an n X n board summed over all starting positions.

Original entry on oeis.org

0, 4, 18, 40, 70, 108, 154, 208, 270, 340, 418, 504, 598, 700, 810, 928, 1054, 1188, 1330, 1480, 1638, 1804, 1978, 2160, 2350, 2548, 2754, 2968, 3190, 3420, 3658, 3904, 4158, 4420, 4690, 4968, 5254, 5548, 5850, 6160, 6478, 6804, 7138, 7480, 7830, 8188, 8554
Offset: 1

Views

Author

R. H. Hardin, Mar 08 2011

Keywords

Comments

Row 2 of A187296.
For n>=2, a(n) equals the absolute value of 2^n times the x-coefficient of the characteristic polynomial of the n X n matrix with 1/2's along the main diagonal and 1's everywhere else (see Mathematica code below). - John M. Campbell, Jun 21 2011
If (n,2) is an arrangement of n pairs of parallel lines in general position (no two lines from distinct pairs are parallel and no three lines from distinct pairs intersect) then a(n) gives the number of bounded edges in the arrangement. Wetzel and Alexanderson refer to this arrangement as plaid in general position. - Anthony Hernandez, Aug 08 2016

Programs

  • Mathematica
    Table[Abs[ 2^(n)*Coefficient[ CharacteristicPolynomial[ Array[KroneckerDelta[#1, #2]*(1/2 - 1) + 1 &, {n, n}], x], x]], {n, 2, 55}] (* John M. Campbell, Jun 21 2011 *)
    Table[If[n == 0, 0, n + n^2 - 2], {n, 0, 200, 2}]  (* Vladimir Joseph Stephan Orlovsky, Jun 26 2011 *)
    CoefficientList[Series[2 x (2 + 3 x - x^2)/(1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Feb 08 2014 *)
  • PARI
    a(n)=if(n>1, 4*n^2-6*n, 0) \\ Charles R Greathouse IV, Aug 08 2016

Formula

Empirical: a(n) = 4*n^2 - 6*n = 2*A014107(n) for n>1 (this is now known to be correct - see other comments).
a(n) = +3*a(n-1) -3*a(n-2) +1*a(n-3).
G.f.: 2*x^2*(2+3*x-x^2)/(1-x)^3.

A199855 Inverse permutation to A210521.

Original entry on oeis.org

1, 4, 2, 5, 3, 6, 11, 7, 12, 8, 13, 9, 14, 10, 15, 22, 16, 23, 17, 24, 18, 25, 19, 26, 20, 27, 21, 28, 37, 29, 38, 30, 39, 31, 40, 32, 41, 33, 42, 34, 43, 35, 44, 36, 45, 56, 46, 57, 47, 58, 48, 59, 49, 60, 50, 61, 51, 62, 52, 63, 53, 64, 54, 65, 55, 66, 79
Offset: 1

Views

Author

Boris Putievskiy, Feb 04 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). The order of the list:
T(1,1)=1;
T(2,1), T(2,2), T(1,2), T(1,3), T(3,1),
...
T(2,n-1), T(4,n-3), T(6,n-5), ..., T(n,1),
T(2,n), T(4,n-2), T(6,n-4), ..., T(n,2),
T(1,n), T(3,n-2), T(5,n-4), ..., T(n-1,2),
T(1,n+1), T(3,n-1), T(5,n-3), ..., T(n+1,1),
...
The order of the list elements of adjacent antidiagonals. Let m be a positive integer.
Movement by antidiagonal {T(1,2*m), T(2*m,1)} from T(2,2*m-1) to T(2*m,1) length of step is 2,
movement by antidiagonal {T(1,2*m+1), T(2*m+1,1)} from T(2,2*m) to T(2*m,2) length of step is 2,
movement by antidiagonal {T(1,2*m), T(2*m,1)} from T(1,2*m) to T(2*m-1,2) length of step is 2,
movement by antidiagonal {T(1,2*m+1), T(2*m+1,1)} from T(1,2*m+1) to T(2*m+1,1) length of step is 2.
Table contains:
row 1 is alternation of elements A001844 and A084849,
row 2 is alternation of elements A130883 and A058331,
row 3 is alternation of elements A051890 and A096376,
row 4 is alternation of elements A033816 and A005893,
row 6 is alternation of elements A100037 and A093328;
row 5 accommodates elements A097080 in odd places,
row 7 accommodates elements A137882 in odd places,
row 10 accommodates elements A100038 in odd places,
row 14 accommodates elements A100039 in odd places;
column 1 is A093005 and alternation of elements A000384 and A001105,
column 2 is alternation of elements A046092 and A014105,
column 3 is A105638 and alternation of elements A014106 and A056220,
column 4 is alternation of elements A142463 and A014107,
column 5 is alternation of elements A091823 and A054000,
column 6 is alternation of elements A090288 and |A168244|,
column 8 is alternation of elements A059993 and A033537;
column 7 accommodates elements A071355 in odd places,
column 9 accommodates elements |A147973| in even places,
column 10 accommodates elements A139570 in odd places,
column 13 accommodates elements A130861 in odd places.

Examples

			The start of the sequence as table:
   1,  4,  5,  11,  13,  22,  25,  37,  41,  56,  61, ...
   2,  3,  7,   9,  16,  19,  29,  33,  46,  51,  67, ...
   6, 12, 14,  23,  26,  38,  42,  57,  62,  80,  86, ...
   8, 10, 17,  20,  30,  34,  47,  52,  68,  74,  93, ...
  15, 24, 27,  39,  43,  58,  63,  81,  87, 108, 115, ...
  18, 21, 31,  35,  48,  53,  69,  75,  94, 101. 123, ...
  28, 40, 44,  59,  64,  82,  88, 109, 116, 140, 148, ...
  32, 36, 49,  54,  70,  76,  95, 102, 124, 132, 157, ...
  45, 60, 65,  83,  89, 110, 117, 141, 149, 176, 185, ...
  50, 55, 71,  77,  96, 103, 125, 133, 158, 167, 195, ...
  66, 84, 90, 111, 118, 142, 150, 177, 186, 216, 226, ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   4,  2;
   5,  3,  6;
  11,  7, 12,  8;
  13,  9, 14, 10, 15;
  22, 16, 23, 17, 24, 18;
  25, 19, 26, 20, 27, 21, 28;
  37, 29, 38, 30, 39, 31, 40, 32;
  41, 33, 42, 34, 43, 35, 44, 36, 45;
  56, 46, 57, 47, 58, 48, 59, 49, 60, 50;
  61, 51, 62, 52, 63, 53, 64, 54, 65, 55, 66;
  ...
The start of the sequence as array read by rows, the length of row r is 4*r-3.
First 2*r-2 numbers are from the row number 2*r-2 of  triangle array, located above.
Last  2*r-1 numbers are from the row number 2*r-1 of  triangle array, located above.
   1;
   4, 2, 5, 3, 6;
  11, 7,12, 8,13, 9,14,10,15;
  22,16,23,17,24,18,25,19,26,20,27,21,28;
  37,29,38,30,39,31,40,32,41,33,42,34,43,35,44,36,45;
  56,46,57,47,58,48,59,49,60,50,61,51,62,52,63,53,64,54,65,55,66;
  ...
Row number r contains permutation numbers 4*r-3 from 2*r*r-5*r+4 to 2*r*r-r:
2*r*r-3*r+2,2*r*r-5*r+4, 2*r*r-3*r+3, 2*r*r-5*r+5, 2*r*r-3*r+4, 2*r*r-5*r+6, ..., 2*r*r-3*r+1, 2*r*r-r.
...
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=(2*j**2+(4*i-5)*j+2*i**2-3*i+2+(2+(-1)**j)*((1-(t+1)*(-1)**i)))/4

Formula

T(n,k) = (2*k^2+(4*n-5)*k+2*n^2-3*n+2+(2+(-1)^k)*((1-(k+n-1)*(-1)^i)))/4.
a(n) = (2*j^2+(4*i-5)*j+2*i^2-3*i+2+(2+(-1)^j)*((1-(t+1)*(-1)^i)))/4, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((sqrt(8*n-7) - 1)/2).

A221216 T(n,k) = ((n+k)^2-2*(n+k)+4-(3*n+k-2)*(-1)^(n+k))/2; n , k > 0, read by antidiagonals.

Original entry on oeis.org

1, 5, 6, 4, 3, 2, 12, 13, 14, 15, 11, 10, 9, 8, 7, 23, 24, 25, 26, 27, 28, 22, 21, 20, 19, 18, 17, 16, 38, 39, 40, 41, 42, 43, 44, 45, 37, 36, 35, 34, 33, 32, 31, 30, 29, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 80
Offset: 1

Views

Author

Boris Putievskiy, Feb 22 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). Let m be natural number. The order of the list:
T(1,1)=1;
T(3,1), T(2,2), T(1,3);
T(1,2), T(2,1);
. . .
T(2*m+1,1), T(2*m,2), T(2*m-1,3),...T(2,2*m), T(1,2*m+1);
T(1,2*m), T(2,2*m-1), T(3,2*m-2),...T(2*m-1,2),T(2*m,1);
. . .
First row contains antidiagonal {T(1,2*m+1), ... T(2*m+1,1)}, read upwards.
Second row contains antidiagonal {T(1,2*m), ... T(2*m,1)}, read downwards.

Examples

			The start of the sequence as table:
  1....5...4..12..11..23..22...
  6....3..13..10..24..21..39...
  2...14...9..25..20..40..35...
  15...8..26..19..41..34..60...
  7...27..18..42..33..61..52...
  28..17..43..32..62..51..85...
  16..44..31..63..50..86..73...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  5,6;
  4,3,2;
  12,13,14,15;
  11,10,9,8,7;
  23,24,25,26,27,28;
  22,21,20,19,18,17,16;
  . . .
Row number r consecutive contains r numbers.
If r is odd,  row is decreasing.
If r is even, row is increasing.
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=((t+2)**2-2*(t+2)+4-(3*i+j-2)*(-1)**t)/2

Formula

As table
T(n,k) = ((n+k)^2-2*(n+k)+4-(3*n+k-2)*(-1)^(n+k))/2.
As linear sequence
a(n) = (A003057(n)^2-2*A003057(n)+4-(3*A002260(n)+A004736(n)-2)*(-1)^A003056(n))/2; a(n) = ((t+2)^2-2*(t+2)+4-(i+3*j-2)*(-1)^t)/2,
where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

A221217 T(n,k) = ((n+k)^2-2*n+3-(n+k-1)*(1+2*(-1)^(n+k)))/2; n , k > 0, read by antidiagonals.

Original entry on oeis.org

1, 6, 5, 4, 3, 2, 15, 14, 13, 12, 11, 10, 9, 8, 7, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 91
Offset: 1

Views

Author

Boris Putievskiy, Feb 22 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). Let m be natural number. The order of the list:
T(1,1)=1;
T(3,1), T(2,2), T(1,3);
T(2,1), T(1,2);
. . .
T(2*m+1,1), T(2*m,2), T(2*m-1,3),...T(1,2*m+1);
T(2*m,1), T(2*m-1,2), T(2*m-2,3),...T(1,2*m);
. . .
First row contains antidiagonal {T(1,2*m+1), ... T(2*m+1,1)}, read upwards.
Second row contains antidiagonal {T(1,2*m), ... T(2*m,1)}, read upwards.

Examples

			The start of the sequence as table:
  1....6...4..15..11..28..22...
  5....3..14..10..27..21..44...
  2...13...9..26..20..43..35...
  12...8..25..19..42..34..63...
  7...24..18..41..33..62..52...
  23..17..40..32..61..51..86...
  16..39..31..60..50..85..73...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  6,5;
  4,3,2;
  15,14,13,12;
  11,10,9,8,7;
  28,27,26,25,24,23;
  22,21,20,19,18,17,16;
  . . .
Row number r consecutive contains r numbers in decreasing order.
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result=((t+2)**2-2*i+3-(t+1)*(1+2*(-1)**t))/2

Formula

As table
T(n,k) = ((n+k)^2-2*n+3-(n+k-1)*(1+2*(-1)^(n+k)))/2.
As linear sequence
a(n) = (A003057(n)^2-2*A002260(n)+3-A002024(n)*(1+2*(-1)^A003056(n)))/2;
a(n) = ((t+2)^2-2*i+3-(t+1)*(1+2*(-1)**t))/2, where i=n-t*(t+1)/2,
j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

A274602 Triangle read by rows: T(n,k) = k*(n-k+1)^2 + n - k, 0 <= k <= n.

Original entry on oeis.org

0, 1, 1, 2, 5, 2, 3, 11, 9, 3, 4, 19, 20, 13, 4, 5, 29, 35, 29, 17, 5, 6, 41, 54, 51, 38, 21, 6, 7, 55, 77, 79, 67, 47, 25, 7, 8, 71, 104, 113, 104, 83, 56, 29, 8, 9, 89, 135, 153, 149, 129, 99, 65, 33, 9, 10, 109, 170, 199, 202, 185, 154, 115, 74, 37, 10
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 01 2016

Keywords

Comments

Mirrored version of a(n) is T(n,k) = (n-k)*(k+1)^2+k, 0 <= k <= n, read by rows:
0
1 1
2 5 2
3 9 11 3
4 13 20 19 4
5 17 29 35 29 5
As an infinite square array (matrix) with comments:
0 1 2 3 4 5 A001477
1 5 11 19 29 41 A028387
2 9 20 35 54 77 A014107
3 13 29 51 79 113 A144391
4 17 38 67 104 149 A182868
5 21 47 83 129 185

Examples

			0; 1,1; 2,5,2; 3,11,9,3; 4,19,20,13,4; 5,29,35,29,17,5; ...
As an infinite triangular array:
0
1   1
2   5   2
3  11   9    3
4  19  20   13    4
5  29  35   29   17    5
As an infinite square array (matrix) with comments:
0   1   2    3    4    5                   A001477
1   5   9   13   17   21                   A016813
2  11  20   29   38   47                   A017185
3  19  35   51   67   83
4  29  54   79  104  129
5  41  77  113  149  185
		

Crossrefs

Cf. Triangle read by rows: T(n,k) = k*(n-k+1)^m+n-k, 0 <= k <= n: A003056 (m = 0), A059036 (m = 1), A278910 (m = k).

Programs

  • Magma
    /* As triangle */ [[k*(n-k+1)^2+n-k: k in [0..n]]: n in [0..10]];
  • Mathematica
    Table[k (n - k + 1)^(k + #) + n - k &[2 - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Dec 02 2016 *)

A361209 Second hexagonal numbers having middle divisors.

Original entry on oeis.org

36, 210, 300, 528, 990, 1176, 1485, 1596, 2080, 2346, 3240, 3570, 4095, 4278, 4851, 5460, 6555, 6786, 7260, 8256, 8778, 9870, 10440, 11628, 12880, 13530, 14196, 14535, 15225, 15576, 17020, 17766, 20100, 20910, 21736, 22578, 23436, 24310, 25200, 26565, 27495, 27966, 30876
Offset: 1

Views

Author

Omar E. Pol, Mar 10 2023

Keywords

Comments

The middle divisors of n are the divisors in the half-open interval [sqrt(n/2), sqrt(n*2)).
Also numbers k with the property that in the symmetric representation of sigma(k) the smallest Dyck path has a central peak and the largest Dyck path has a central valley and both Dyck paths do not meet in the center.

Examples

			36 is in the sequence because it is a second hexagonal number (A014105) and it has a middle divisor, the 6.
On the other hand the 35th row of A237593 is [18,7,3,2,2,1,2,2,1,2,2,3,7,18] and the 36th row of the same triangle is [19,6,4,2,2,1,1,1,1,1,1,2,2,4,6,19]. Since the smallest Dyck path of the symmetric representation of sigma(36) has a central peak and the largest Dyck path has a central valley and both Dyck paths do not meet in the center so 36 is in the sequence. The diagram is too large to include.
		

Crossrefs

Intersection of A014105 and A071562.
Nonzero terms of A014107 without the terms of A298856.

Programs

  • Mathematica
    A071562Q[n_]:=With[{m1=Sqrt[n/2],m2=Sqrt[2n]},DivisorSum[n,#&,m1<=#0];
    With[{upto=200},Select[Array[#(2#+1)&,upto],A071562Q]] (* Checks the first 200 second hexagonal numbers *) (* Paolo Xausa, Oct 23 2023 *)
  • PARI
    hasmd(n)=fordiv(n, d, if(d^2>=n/2 && d^2<2*n, return(1))); 0; \\ A014105
    select(hasmd, vector(150, n, n*(2*n + 1))) \\ Michel Marcus, Mar 10 2023

Extensions

More terms from Michel Marcus, Mar 10 2023

A199479 Triangle T(n,k), read by rows, given by (1,0,0,0,0,0,0,0,0,0,...) DELTA (1,1,1,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 5, 9, 5, 1, 7, 20, 27, 13, 1, 9, 35, 73, 80, 34, 1, 11, 54, 151, 252, 234, 89, 1, 13, 77, 269, 597, 837, 677, 233, 1, 15, 104, 435, 1199, 2225, 2702, 1941, 610, 1, 17, 135, 657, 2158, 4956, 7943, 8533, 5523, 1597
Offset: 0

Views

Author

Philippe Deléham, Nov 06 2011

Keywords

Comments

Mirror image of triangle in A147703.

Examples

			Triangle begins:
  1;
  1,  1;
  1,  3,  2;
  1,  5,  9,  5;
  1,  7, 20, 27, 13;
  1,  9, 35, 73, 80, 34;
		

Crossrefs

Formula

Sum_{k=0..n} T(n,k)*x^k = A152620(n), A152594(n), A000007(n), A000012(n), A006012(n), A152596(n), A152599(n) for x=-3,-2,-1,0,1,2,3 respectively.
T(n,n) = A001519(n).
G.f.: (1-2y*x)/(1-(1+3y)*x+y*(1+y)*x^2).

A303609 a(n) = 2*n^3 + 9*n^2 + 9*n.

Original entry on oeis.org

0, 20, 70, 162, 308, 520, 810, 1190, 1672, 2268, 2990, 3850, 4860, 6032, 7378, 8910, 10640, 12580, 14742, 17138, 19780, 22680, 25850, 29302, 33048, 37100, 41470, 46170, 51212, 56608, 62370, 68510, 75040, 81972, 89318, 97090, 105300, 113960, 123082, 132678, 142760
Offset: 0

Views

Author

Vincenzo Librandi, Apr 28 2018

Keywords

Comments

y-values solving the Diophantine equation 4*x^3 + 9*x^2 = y^2 for positive x (which are listed in A028552). The equation is also satisfied by y=2 and x=-2.

Crossrefs

Cf. A014107, A028552 (associated x).

Programs

  • GAP
    List([0..50],n->n*(2*n^2+9*n+9)); # Muniru A Asiru, Apr 29 2018
  • Magma
    [2*n^3+9*n^2+9*n: n in [0..40]];
    
  • Mathematica
    Table[2 n^3 + 9 n^2 + 9 n, {n, 0, 40}] (* or *) CoefficientList[Series[(20 x - 10 x^2 + 2 x^3) / (1 - x)^4, {x, 0, 33}], x]

Formula

G.f.: 2*x*(10 - 5*x + x^2)/(1 - x)^4.
a(n) = n*(2*n^2 + 9*n + 9) = n*A014107(n+3).
From Elmo R. Oliveira, Aug 07 2025: (Start)
E.g.f.: exp(x)*x*(20 + 15*x + 2*x^2).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)
Previous Showing 31-38 of 38 results.