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

A242771 Number of integer points in a certain quadrilateral scaled by a factor of n (another version).

Original entry on oeis.org

0, 0, 1, 3, 6, 9, 14, 19, 25, 32, 40, 48, 58, 68, 79, 91, 104, 117, 132, 147, 163, 180, 198, 216, 236, 256, 277, 299, 322, 345, 370, 395, 421, 448, 476, 504, 534, 564, 595, 627, 660, 693, 728, 763, 799, 836, 874, 912, 952, 992, 1033, 1075, 1118, 1161, 1206
Offset: 1

Views

Author

Michael Somos, May 22 2014

Keywords

Comments

The quadrilateral is given by four vertices [(1/2, 1/3), (0, 1), (0, 0), (1, 0)] as an example on page 22 of Ehrhart 1967. Here the open line segment from (1/2, 1/3) to (0, 1) is included but the rest of the boundary is not. The sequence is denoted by d'(n).
From Gus Wiseman, Oct 18 2020: (Start)
Also the number of ordered triples of positive integers summing to n that are not strictly increasing. For example, the a(3) = 1 through a(7) = 14 triples are:
(1,1,1) (1,1,2) (1,1,3) (1,1,4) (1,1,5)
(1,2,1) (1,2,2) (1,3,2) (1,3,3)
(2,1,1) (1,3,1) (1,4,1) (1,4,2)
(2,1,2) (2,1,3) (1,5,1)
(2,2,1) (2,2,2) (2,1,4)
(3,1,1) (2,3,1) (2,2,3)
(3,1,2) (2,3,2)
(3,2,1) (2,4,1)
(4,1,1) (3,1,3)
(3,2,2)
(3,3,1)
(4,1,2)
(4,2,1)
(5,1,1)
A001399(n-6) counts the complement (unordered strict triples).
A014311 \ A333255 ranks these compositions.
A140106 is the unordered version.
A337484 is the case not strictly decreasing either.
A337698 counts these compositions of any length, with complement A000009.
A001399(n-6) counts unordered strict triples.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A069905 counts unordered triples.
A218004 counts strictly increasing or weakly decreasing compositions.
A337483 counts triples either weakly increasing or weakly decreasing.
(End)

Examples

			G.f. = x^3 + 3*x^4 + 6*x^5 + 9*x^6 + 14*x^7 + 19*x^8 + 25*x^9 + 32*x^10 + ...
		

Crossrefs

Programs

  • Magma
    [Floor((5*n-7)*(n-1)/12): n in [1..60]]; // Vincenzo Librandi, Jun 27 2015
  • Mathematica
    a[ n_] := Quotient[ 7 - 12 n + 5 n^2, 12];
    a[ n_] := With[ {o = Boole[ 0 < n], c = Boole[ 0 >= n], m = Abs@n}, Length @ FindInstance[ 0 < c + x && 0 < c + y && (2 x < c + m && 4 x + 3 y < o + 3 m || m < o + 2 x && 2 x + 3 y < c + 2 m), {x, y}, Integers, 10^9]];
    LinearRecurrence[{1,1,0,-1,-1,1},{0,0,1,3,6,9},90] (* Harvey P. Dale, May 28 2015 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],!Less@@#&]],{n,0,15}] (* Gus Wiseman, Oct 18 2020 *)
  • PARI
    {a(n) = (7 - 12*n + 5*n^2) \ 12};
    
  • PARI
    {a(n) = if( n<0, polcoeff( x * (2 + x^2 + x^3 + x^4) / ((1 - x)^2 * (1 - x^6)) + x * O(x^-n), -n), polcoeff( x^3 * (1 + x + x^2 + 2*x^4) / ((1 - x)^2 * (1 - x^6)) + x * O(x^n), n))};
    

Formula

G.f.: x^3 * (1 + 2*x + 2*x^2) / (1 - x - x^2 + x^4 + x^5 - x^6) = (x^3 + x^4 + x^5 + 2*x^7) / ((1 - x)^2 * (1 - x^6)).
a(n) = floor( A147874(n) / 12).
a(-n) = A002789(n).
a(n+1) - a(n) = A010761(n).
For n >= 6, a(n) = A000217(n-2) - A001399(n-6). - Gus Wiseman, Oct 18 2020

A248158 Expansion of (1 - 2*x^2)/(1 + x)^3. Second column of Riordan triangle A248156.

Original entry on oeis.org

1, -3, 4, -4, 3, -1, -2, 6, -11, 17, -24, 32, -41, 51, -62, 74, -87, 101, -116, 132, -149, 167, -186, 206, -227, 249, -272, 296, -321, 347, -374, 402, -431, 461, -492, 524, -557, 591, -626, 662, -699, 737, -776, 816, -857, 899, -942, 986
Offset: 0

Views

Author

Wolfdieter Lang, Oct 05 2014

Keywords

Comments

This is the column k=1 sequence of the Riordan triangle A248156 without a leading zero.

Crossrefs

Cf. A046691, A148157, A248156(n+1,1).

Programs

  • Magma
    [(-1)^n*(2+5*n-n^2)/2: n in [0..60]]; // G. C. Greubel, May 30 2025
    
  • Mathematica
    Table[(-1)^n*(2+5*n-n^2)/2, {n,0,60}] (* G. C. Greubel, May 30 2025 *)
  • Python
    def A248158(n): return (-1)**n*(2+5*n-n**2)//2
    print([A248158(n) for n in range(51)]) # G. C. Greubel, May 30 2025

Formula

O.g.f.: (1 - 2*x^2)/(1 + x)^3 = -2/(1 + x) + 4/(1 + x)^2 - 1/(1 + x)^3.
a(n) = (-1)^n*(4*(2*n+1) - (n+1)*(n+2))/2, n >= 0.
a(n) = -3*(a(n-1) + a(n-2)) - a(n-3), n >= 3 with a(0) = 1, a(1) = -3 and a(2) = 4.
From R. J. Mathar, Mar 13 2021: (Start)
a(n) = (-1)^(n+1)*A046691(n-5).
a(n) + a(n+1) = A248157(n+1). (End)
E.g.f.: (1/2)*(2 - 4*x - x^2)*exp(-x). - G. C. Greubel, May 30 2025

A060577 Number of homeomorphically irreducible general graphs on 2 labeled nodes and with n edges.

Original entry on oeis.org

1, 1, 4, 6, 11, 17, 24, 32, 41, 51, 62, 74, 87, 101, 116, 132, 149, 167, 186, 206, 227, 249, 272, 296, 321, 347, 374, 402, 431, 461, 492, 524, 557, 591, 626, 662, 699, 737, 776, 816, 857, 899, 942, 986, 1031, 1077, 1124, 1172, 1221, 1271, 1322, 1374, 1427
Offset: 0

Views

Author

Vladeta Jovovic, Apr 04 2001

Keywords

Comments

A homeomorphically irreducible general graph is a graph with multiple edges and loops and without nodes of degree 2.

References

  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983.

Crossrefs

Programs

  • Maple
    gf := (2*x^5 - 4*x^4 + 4*x^3 - 4*x^2 + 2*x - 1)/(x - 1)^3: s := series(gf, x, 100): for i from 0 to 100 do printf(`%d,`,coeff(s,x,i)) od:
  • Mathematica
    Join[{1, 1, 4}, Table[n (n + 3)/2 - 3, {n, 3, 60}]] (* Bruno Berselli, Aug 20 2015 *)

Formula

G.f.: (2*x^5 - 4*x^4 + 4*x^3 - 4*x^2 + 2*x - 1)/(x - 1)^3.
E.g.f. for homeomorphically irreducible general graphs with n nodes and k edges is (1 + x*y)^( - 1/2)*exp( - x*y/2 + x^2*y^2/4)*Sum_{k >= 0} 1/(1 - x)^binomial(k + 1, 2)*exp( - x^2*y*k^2/(2*(1 + x*y)) - x^2*y*k/2)*y^k/k!.
From Marco Ripà, Aug 20 2015: (Start)
a(n) = ceiling( (1/2)*(3*n^2 - 10*n + 9)/(n - 2) ) + floor( (3/2)*(n-1)^2 ) - n^2 + 3*n - 3 with n > 2, a(0) = a(1) = 1, a(2) = 4.
a(n) = n*(n + 3)/2 - 3 for n > 2.
a(n) = A046691(n-1) for n > 2. (End)

Extensions

More terms from James Sellers, Apr 04 2001

A346376 a(n) = n^4 + 14*n^3 + 63*n^2 + 98*n + 28.

Original entry on oeis.org

28, 204, 604, 1348, 2580, 4468, 7204, 11004, 16108, 22780, 31308, 42004, 55204, 71268, 90580, 113548, 140604, 172204, 208828, 250980, 299188, 354004, 416004, 485788, 563980, 651228, 748204, 855604, 974148, 1104580, 1247668, 1404204, 1575004, 1760908, 1962780
Offset: 0

Views

Author

Lamine Ngom, Jul 14 2021

Keywords

Comments

The product of eight consecutive positive integers can always be expressed as the difference of two squares: x^2 - y^2.
This sequence gives the x-values for each product. The y-values are A017113(n+4).
a(n) is always divisible by 4. In addition, we have (a(n)+16)/4 belongs to A028387.
Are 4 and 8 the unique values of k such that the product of k consecutive integers is always distant to upper square by a square?

Crossrefs

Formula

a(n) = A239035(n)^2 - A017113(n+4)^2.
a(n) = 4*(A028387(A046691(n+2)) - 4).
G.f.: 4*(7 + 16*x - 34*x^2 + 22*x^3 - 5*x^4)/(1 - x)^5. - Stefano Spezia, Jul 14 2021

A179571 Number of permutations of 1..n+4 with the number moved left exceeding the number moved right by n.

Original entry on oeis.org

31, 66, 134, 267, 529, 1048, 2080, 4137, 8243, 16446, 32842, 65623, 131173, 262260, 524420, 1048725, 2097319, 4194490, 8388814, 16777443, 33554681, 67109136, 134218024, 268435777, 536871259, 1073742198, 2147484050, 4294967727
Offset: 1

Views

Author

R. H. Hardin, g.f. from R. J. Mathar in the Sequence Fans Mailing List, Jul 19 2010

Keywords

Comments

Recurrence would also extend to an a(0) if the definition were made to exclude the identity permutation.

Crossrefs

Cf. A083706.

Programs

Formula

Empirical: a(n)=5*a(n-1)-9*a(n-2)+7*a(n-3)-2*a(n-4) ; G.f.: -x*(-31+89*x-83*x^2+26*x^3) / ( (2*x-1)*(x-1)^3 ).
Empirical: a(n) = (n^2+3*n-6)/2 +2^(n+4) = 2^(n+4)+A046691(n-1). - R. J. Mathar, May 26 2016

A356754 Triangle read by rows: T(n,k) = ((n-1)*(n+2))/2 + 2*k.

Original entry on oeis.org

2, 4, 6, 7, 9, 11, 11, 13, 15, 17, 16, 18, 20, 22, 24, 22, 24, 26, 28, 30, 32, 29, 31, 33, 35, 37, 39, 41, 37, 39, 41, 43, 45, 47, 49, 51, 46, 48, 50, 52, 54, 56, 58, 60, 62, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87
Offset: 1

Views

Author

Torlach Rush, Aug 25 2022

Keywords

Comments

The first column of the triangle is the Lazy Caterer's sequence A000124.
Each subsequent column starts with A000124(n) + (2 * (n-1)).
The first downward diagonal is A046691(n).
Columns and downward diagonals of the triangle identify many sequences (possibly shifted) in the database. Examples can be found in crossrefs below.
The sum of the n-th upward diagonal of the triangle is A356288(n).

Examples

			Triangle T(n,k) begins:
  n\k   1   2   3   4   5   6   7   8   9  10  11  ...
   1:   2
   2:   4   6
   3:   7   9  11
   4:  11  13  15  17
   5:  16  18  20  22  24
   6:  22  24  26  28  30  32
   7:  29  31  33  35  37  39  41
   8:  37  39  41  43  45  47  49  51
   9:  46  48  50  52  54  56  58  60  62
  10:  56  58  60  62  64  66  68  70  72  74
  11:  67  69  71  73  75  77  79  81  83  85  87
  ...
		

Crossrefs

Programs

  • Mathematica
    Table[((n-1)(n+2))/2+2k,{n,20},{k,n}]//Flatten (* Harvey P. Dale, May 26 2023 *)
  • Python
    def T(n, k): return ((n-1) * (n+2))//2 + 2*k
    for n in range(1, 12):
        for k in range(1,(n+1)): print(T(n,k), end = ', ')
    
  • Python
    # Indexed as a linear sequence.
    def a000124(n): return n*(n+1)//2 + 1
    def a(n):
        l = m = 0
        for k in range(1,n):
            lc = a000124(k - 1)
            if n >= lc:
                l = lc
                m = k
            else: break
        return n + m + (n - l)

Formula

T(n,k) = ((n-1) * (n+2))/2 + 2*k.
T(n,k+1) = T(n,k) + 2, k < n.
Previous Showing 11-16 of 16 results.