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

A011848 a(n) = floor(binomial(n, 2)/2).

Original entry on oeis.org

0, 0, 0, 1, 3, 5, 7, 10, 14, 18, 22, 27, 33, 39, 45, 52, 60, 68, 76, 85, 95, 105, 115, 126, 138, 150, 162, 175, 189, 203, 217, 232, 248, 264, 280, 297, 315, 333, 351, 370, 390, 410, 430, 451, 473, 495, 517, 540, 564, 588, 612, 637, 663, 689, 715, 742, 770, 798
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1996

Keywords

Comments

Column sums of an array of the odd numbers repeatedly shifted 4 places to the right:
1 3 5 7 9 11 13 15 17...
1 3 5 7 9...
1...
.........................
-------------------------
1 3 5 7 10 14 18 22 27...
Floor of the area under the polygon connecting the lattice points (n, floor(n/2)) from 0..n. - Wesley Ivan Hurt, Jun 09 2014
Beginning with a(4)=3, the sequence might be called the "off-axis" Ulam-Spiral numbers because they are the numbers in ascending order on the horizontal and vertical spokes (heading outward) starting with the first turning points on the spiral (i.e., 3, 5, 7 and 10). That is, starting with: 3 (upward); 5 (leftward); 7 (downward) and 10 (rightward). These are A033991 (starting at a(1)), A007742 (starting at a(1)), A033954 (starting at a(1)) and A001107 (starting at a(2)), respectively. These quadri-sections are summarized in the formulas of Sep 26 2015. - Bob Selcoe, Oct 05 2015
Conjecture: For n = 2, a(n) is the greatest k such that A123663(k) < A000217(n - 2). - Peter Kagey, Nov 18 2016
a(n) is also the matching number of the n-triangular graph, (n-1)-triangular honeycomb queen graph, (n-1)-triangular honeycomb bishop graphs, and (for n > 7) (n-1)-triangular honeycomb obtuse knight graphs. - Eric W. Weisstein, Jun 02 2017 and Apr 03 2018
After 0, 0, 0, add 1, then add 2 three times, then add 3, then add 4 three times, then add 5, etc.; i.e., first differences are A004524 = (0, 0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, ...). - M. F. Hasler, May 09 2018
Let s(0) = s(1) = 1, s(-1) = s(2) = x, and s(n+2)*s(n-2) = s(n+1)*s(n-1) + s(n)^2 for all n in Z. Then s(n) = p(n) / x^e(n) is a Laurent polynomial in x with p(n) a polynomial with nonnegative integer coefficients of degree a(n) for all n in Z. If x = 1, then s(n) = p(n) = A006720(n+1). - Michael Somos, Mar 22 2023

Examples

			G.f. = x^3 + 3*x^4 + 5*x^5 + 7*x^6 + 10*x^7 + 14*x^8 + 18*x^9 + 22*x^10 + ...
p(0) = p(1) = 1, p(2) = 1 + x, p(3) = 1 + x + x^3, p(4) = 1 + 2*x + 2*x^2 + x^3 + x^5. - _Michael Somos_, Mar 22 2023
		

Crossrefs

A column of triangle A011857.
First differences are in A004524.
Cf. A007318, A033991, A007742, A033954, A001107, A006720, A035608 (bisection), A156859 (bisection).

Programs

  • GAP
    List([0..60],n->Int(Binomial(n,2)/2)); # Muniru A Asiru, Apr 05 2018
    
  • Haskell
    a011848 n = if n < 2 then 0 else flip div 2 $ a007318 n 2
    -- Reinhard Zumkeller, Mar 04 2015
    
  • Magma
    [ Floor(n*(n-1)/4) : n in [0..50] ]; // Wesley Ivan Hurt, Jun 09 2014
    
  • Maple
    seq(floor(binomial(n,2)/2), n=0..57); # Zerinvary Lajos, Jan 12 2009
  • Mathematica
    Table[Floor[n (n - 1)/4], {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, Jun 28 2011 *)
    CoefficientList[Series[x^3/((1 + x^2) (1 - x)^3), {x, 0, 70}], x] (* Vincenzo Librandi, Jun 21 2013 *)
    LinearRecurrence[{3, -4, 4, -4, 1}, {0, 0, 1, 3, 5}, {0, 20}] (* Eric W. Weisstein, Jun 02 2017 *)
    Table[Floor[Binomial[n, 2]/2], {n, 0, 20}] (* Eric W. Weisstein, Jun 02 2017 *)
    Table[1/4 (-1 + (-1 + n) n + Cos[n Pi/2] + Sin[n Pi/2]), {n, 0, 20}] (* Eric W. Weisstein, Jun 02 2017 *)
    Floor[Binomial[Range[0, 20], 2]/2] (* Eric W. Weisstein, Apr 03 2018 *)
  • PARI
    a(n) = binomial(n, 2)\2;
    
  • PARI
    vector(100, n, n--; floor(n*(n-1)/4)) \\ Altug Alkan, Sep 30 2015
    
  • Python
    def a(n): return n*(n-1)//4 # Christoph B. Kassir, Oct 07 2022
  • Sage
    [floor(binomial(n,2)/2) for n in range(0,58)] # Zerinvary Lajos, Dec 01 2009
    

Formula

G.f.: x^3*(1-x^2)/((1-x)^3*(1-x^4)).
G.f.: x^3/((1+x^2)*(1-x)^3). - Jon Perry, Mar 31 2004
a(n) = +3*a(n-1) -4*a(n-2) +4*a(n-3) -3*a(n-4) +a(n-5). - R. J. Mathar, Apr 15 2010
a(n) = floor((n/(1+e^(1/n)))^2). - Richard R. Forberg, Jun 19 2013
a(n) = floor(n*(n-1)/4). - T. D. Noe, Jun 20 2013
a(n) = (1/4) * ( n^2 - n - 1 + (-1)^floor(n/2) ). - Ralf Stephan, Aug 11 2013
a(n) = A054925(n) - A133872(n+2). - Wesley Ivan Hurt, Jun 09 2014
a(4*n) = A033991(n). a(4*n+1) = A007742(n). a(4*n+2) = A033954(n). a(4*n+3) = A001107(n+1). - Bob Selcoe, Sep 26 2015
E.g.f.: (sin(x) + cos(x) + (x^2 - 1)*exp(x))/4. - Ilya Gutkovskiy, Nov 18 2016
A054925(n) = a(-n). A035608(n) = a(2*n+1). Wesley Ivan Hurt, Jun 09 2014
A156859(n) = a(2*n+2). - Michael Somos, Nov 18 2016
Euler transform of length 4 sequence [ 3, -1, 0, 1]. - Michael Somos, Nov 18 2016
From Amiram Eldar, Mar 18 2022: (Start)
Sum_{n>=3} 1/a(n) = 40/9 - 2*Pi/3.
Sum_{n>=3} (-1)^(n+1)/a(n) = 32/9 - 4*log(2). (End)
0 = a(n+2)*(a(n)*(a(n) -6*a(n+1) +4*a(n+2)) +a(n+1)*(8*a(n+1) -10*a(n+2)) + 3*a(n+2)^2) +a(n+3)*(a(n)*(+a(n) -2*a(n+1)) +a(n+2)*(2*a(n+1) -a(n+2))) for all n in Z. - Michael Somos, Mar 22 2023
2*a(n) + 2*a(n-2) = (n-1)*(n-2). - R. J. Mathar, Feb 12 2024

A260643 Start a spiral of numbers on a square grid, with the initial square as a(1) = 1. a(n) is the smallest positive integer not equal to or previously adjacent (horizontally/vertically) to its neighbors. See the Comments section for a more exact definition.

Original entry on oeis.org

1, 2, 3, 4, 2, 5, 3, 6, 7, 1, 8, 7, 4, 8, 5, 6, 4, 9, 7, 10, 1, 9, 8, 11, 3, 12, 11, 10, 12, 13, 1, 12, 14, 9, 10, 14, 1, 15, 6, 13, 2, 16, 3, 17, 11, 13, 5, 14, 2, 11, 6, 14, 13, 9, 15, 18, 2, 19, 5, 15, 16, 4, 17, 20, 2, 21, 3, 18, 16, 17, 5, 20, 4, 19, 6
Offset: 1

Views

Author

Peter Kagey, Nov 11 2015

Keywords

Comments

A more detailed definition from Antti Karttunen, Dec 09 2015: (Start)
After a(1) = 1, for the next term always choose the smallest number k >= 1 such that neither k and a(n-1) nor k and a(A265400(n)) [in case A265400(n) > 0] are equal, and neither of these pairs occur anywhere adjacent to each other (horizontally or vertically) in so far constructed spiral. Here A265400(n) gives the index of the nearest horizontally or vertically adjacent inner neighbor of the n-th term in spiral, or 0 if n is one of the corner cases A033638.
The condition "... do not occur anywhere adjacent to each other (horizontally or vertically) in so far constructed spiral" can be more formally stated as: there is no such 1 < j < n, for which either the unordered pair {a(j),a(j-1)} or [in case A265400(j) > 0] also the unordered pair {a(j),a(A265400(j))} would be equal to either of the unordered pair {k,a(n-1)} or the unordered pair {k,a(A265400(n))} [in case A265400(n) > 0], where k is the term chosen for a(n). (See also my reference Scheme-implementation.)
(End)

Examples

			a(8) = 6 because pairs {1,2}, {1,4} and {1,5} already occur, the immediately adjacent terms are 1 and 3, thus neither number can be used, so the smallest usable number is 6.
a(12) = 7 because 1 and 2 are already adjacent to 8; 2, 4, 5, and 6 are already adjacent to 3.
The following illustration is the timeline of spiral's construction step-by-step:
        |      |   3  |  43  | 243  | 243  |     |  243  |  243  |  2437
    1   |  12  |  12  |  12  |  12  | 512  |     |  512  |  5128 |  5128
        |      |      |      |      |      | ... |  3671 |  3671 |  3671
        |      |      |      |      |      |     |       |       |
  a(1)=1|a(2)=2|a(3)=3|a(4)=4|a(5)=2|a(6)=5|     |a(10)=1|a(11)=8|a(12)=7
Indices of this spiral are shown below using the base-36 system, employing as its placeholder values the digits 0-9 and letter A-Z. The 1 at the center is where the spiral starts:
            ZYXWV
           HGFEDU
           I543CT
           J612BS
           K789AR
           LMNOPQ
		

Crossrefs

Cf. A272573 (analogous sequence on a hexagonal tiling).
Cf. A265414 (positions of records, where n occurs for the first time), A265415 (positions of ones).

A330039 Number of essential lattice congruences of the weak order on the symmetric group S_n.

Original entry on oeis.org

1, 1, 4, 47, 3322, 11396000
Offset: 1

Views

Author

Torsten Muetze, Nov 28 2019

Keywords

Examples

			For n=3, the weak order on S_3 has the cover relations 123<132, 123<213, 132<312, 213<231, 312<321, 231<321, and there are a(3)=4 essential lattice congruences, namely {}, {132=312}, {213=231}, {132=312,213=231}.
		

Crossrefs

A330040 Number of non-isomorphic cover graphs of lattice quotients of essential lattice congruences of the weak order on the symmetric group S_n.

Original entry on oeis.org

1, 1, 3, 19, 748, 2027309
Offset: 1

Views

Author

Torsten Muetze, Nov 28 2019

Keywords

Examples

			For n=3, the weak order on S_3 has the cover relations 123<132, 123<213, 132<312, 213<231, 312<321, 231<321, and there are four essential lattice congruences, namely {}, {132=312}, {213=231}, {132=312,213=231}. The cover graph of the first one is a 6-cycle, the cover graph of the middle two is a 5-cycle, and the cover graph of the last one is a 4-cycle. These are 3 non-isomorphic graphs, showing that a(3)=3.
		

Crossrefs

A330042 Number of non-isomorphic regular cover graphs of lattice quotients of essential lattice congruences of the weak order on the symmetric group S_n.

Original entry on oeis.org

1, 1, 3, 10, 51, 335, 2909
Offset: 1

Views

Author

Torsten Muetze, Nov 28 2019

Keywords

Examples

			For n=3, the weak order on S_3 has the cover relations 123<132, 123<213, 132<312, 213<231, 312<321, 231<321, and there are four essential lattice congruences, namely {}, {132=312}, {213=231}, {132=312,213=231}. The cover graph of the first one is a 6-cycle, the cover graph of the middle two is a 5-cycle, and the cover graph of the last one is a 4-cycle. These are 3 non-isomorphic regular graphs, showing that a(3)=3.
		

Crossrefs

A263135 The maximum number of penny-to-penny connections when n pennies are placed on the vertices of a hexagonal tiling.

Original entry on oeis.org

0, 0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 30, 31, 32, 34, 35, 36, 38, 39, 41, 42, 43, 45, 46, 48, 49, 50, 52, 53, 55, 56, 57, 59, 60, 62, 63, 64, 66, 67, 69, 70, 72, 73, 74, 76, 77, 79, 80, 81, 83, 84, 86, 87, 89, 90
Offset: 0

Views

Author

Peter Kagey, Oct 10 2015

Keywords

Comments

a(A033581(n)) = A152743(n).
1 <= a(n+1) - a(n) <=2 for all n > 0.
Lim_{n -> infinity} a(n)/n = 3/2.
Conjecture: a(2*n) - A047932(n) = A216256(n) for n > 0.

Examples

			.           |            |     o o     .
.           |      o o   |  o o   o o  .
.    o o    |   o o   o  | o   o o   o .
.   o   o   |  o   o o   |  o o   o o  .
.    o o    |   o o      | o   o o   o .
.           |            |  o o   o o  .
.           |            |     o o     .
.           |            |             .
. f(6) = 6  | f(10) = 11 | f(24) = 30  .
		

Crossrefs

Cf. A047932 (triangular tiling), A123663 (square tiling).

A325946 Maximum number of intercardinal adjacencies among all n-celled polyplets.

Original entry on oeis.org

0, 1, 3, 6, 8, 11, 14, 17, 20, 23, 26, 30, 33, 36, 39, 43, 46, 49, 53, 56, 60, 63, 66, 70, 73, 77, 80, 84, 87, 91, 94, 98, 101, 105, 108, 112, 116, 119, 123, 126, 130, 133, 137, 141, 144, 148, 151, 155, 159, 162, 166, 170, 173, 177, 180, 184, 188, 191, 195, 199, 202, 206, 210, 213, 217, 221, 224, 228, 232, 235, 239, 243, 246, 250, 254
Offset: 1

Views

Author

Keywords

Comments

A123663 provides the maximum number of cardinal adjacencies among n-celled polyominoes. The sequence under consideration here provides the maximum number of intercardinal (edge-to-edge and vertex-to-vertex) adjacencies among all n-celled polyplets.
Both A123663 and this sequence are used by landscape ecologists and geographic information system (GIS) professionals to determine quantitative measures over time of landscape erosion in high density coastal areas.
For initial terms n <= 20, M_O(n) is known to be optimal; for n > 20, the optimality of M_O(n) is probable. - Nicholas P. Taliceo, Jul 12 2021

Examples

			For n = 12, the optimal configuration is a "regular octagon" of side length two (i.e., the symmetric, cross-shaped configuration with rows of length 2, 4, 4, and 2). This yields 30 intercardinal adjacencies.
In general, when n = 7p^2 - 10p + 4 the n tiles can be arranged into the shape of a regular octagon with side length p and 28p^2 - 54p + 26 intercardinal adjacencies. We conjecture these are optimal.
Moreover, we believe all of the intermediary cases are generated by a family of archetypes where one moves from a regular octagon to a "stretched octagon" to a "small corners octagon" and then to the next largest regular octagon. This geometric approach gives rise to the split rule formula described above.
		

Crossrefs

The Aggregation Index is cataloged as A123663.

Programs

  • Python
    # See N. P. Taliceo link.

Formula

By empirical observation a split-rule formula with 15 conditions generates the sequence M = 0, 1, 3, 6, 8, 11, ... correctly for small n - this includes comparison with configurations known to be optimal (n < 20) and with computer generated searches for optimal configurations (n < 500):
M_O(n) = 4n - 14p + 10 - e
where
n = number of tiles in the polyplet t
p = Max{p>=1 : n >= 7p^2-10p+4}
e = 0, if n = 7p^2 - 10p + 4
e = 1, if 7p^2 - 10p + 4 < n <= 7p^2 - 9p + 3
e = 2, if 7p^2 - 9p + 3 < n <= 7p^2 - 8p + 2
e = 3, if 7p^2 - 8p + 2 < n <= 7p^2 - 7p + 2
e = 4, if 7p^2 - 7p + 2 < n <= 7p^2 - 6p + 1
e = 5, if 7p^2 - 6p + 1 < n <= 7p^2 - 5p + 1
e = 6, if 7p^2 - 5p + 1 < n <= 7p^2 - 4p + 1
e = 7, if 7p^2 - 4p + 1 < n <= 7p^2 - 3p
e = 8, if 7p^2 - 3p < n <= 7p^2 - 2p
e = 9, if 7p^2 - 2p < n <= 7p^2 - p
e = 10, if 7p^2 - p < n <= 7p^2
e = 11, if 7p^2 < n <= 7p^2 + p
e = 12, if 7p^2 + p < n <= 7p^2 + 2p
e = 13, if 7p^2 + 2p < n <= 7p^2 + 3p
e = 14, if n > 7p^2 + 3p
This split-rule formula is derived geometrically using an approach described in the Example section.
Subsequently we have proved that M_O can be represented analytically by a single expression: M_O(n) = 4n-ceiling(sqrt(28n-12)).
We have proved the important estimate M_O(n) <= M(n) <= 2*(2n-2*ceiling(sqrt(n))) where 2n-2*ceiling(sqrt(n)) is A123663. This upper bound is not sharp for small n. The relative difference between M_O(n) and 2*(2n-2*ceiling(sqrt(n))) is less than 3% for at least 145 <= n <= 10^7 tiles and the relative difference goes to zero. For practical uses like GIS, our formula will have very small relative error if, in fact, it does not describe the sequence exactly.
Showing 1-7 of 7 results.