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-4 of 4 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

A002798 a(n) = a(n-1) + a(n-2) - a(n-3).

Original entry on oeis.org

18, 45, 69, 96, 120, 147, 171, 198, 222, 249, 273, 300, 324, 351, 375, 402, 426, 453, 477, 504, 528, 555, 579, 606, 630, 657, 681, 708, 732, 759, 783, 810, 834, 861, 885, 912, 936, 963, 987, 1014, 1038, 1065, 1089
Offset: 1

Views

Author

Keywords

Comments

The old definition was a(n) = a(n-2)+a(n-3)-a(n-5).
The following applies to this sequence and also to all sequences of the form a(n) = a(n-1) + a(n-2) - a(n-3), regardless of initial values: (a(n+3i) + a(n))/(a(n+2i) + a(n+i)) = 1, as long as a(n+2i) + a(n+i) != 0. - Klaus Purath, Jun 05 2024

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    A002798:=3*(6+9*z+2*z**2)/(z+1)/(z-1)**2; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    LinearRecurrence[{1,1,-1},{18,45,69},50] (* Harvey P. Dale, Sep 17 2023 *)

Formula

a(n) = 6*A007310(n) + 3*A047208(n).
a(n) = (51*n - 12)/2 - 3*(1 - (-1)^n)/4 = 2*a(n-1) - a(n-2) + 3(-1)^n. - Klaus Purath, Jun 05 2024

Extensions

Definition simplified by Ray Chandler. - N. J. A. Sloane, Mar 07 2024

A242774 a(n) = ceiling( n / 2 ) + ceiling( n / 3 ).

Original entry on oeis.org

2, 2, 3, 4, 5, 5, 7, 7, 8, 9, 10, 10, 12, 12, 13, 14, 15, 15, 17, 17, 18, 19, 20, 20, 22, 22, 23, 24, 25, 25, 27, 27, 28, 29, 30, 30, 32, 32, 33, 34, 35, 35, 37, 37, 38, 39, 40, 40, 42, 42, 43, 44, 45, 45, 47, 47, 48, 49, 50, 50, 52, 52, 53, 54, 55, 55, 57
Offset: 1

Views

Author

Michael Somos, May 22 2014

Keywords

Examples

			G.f. = 2*x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 5*x^6 + 7*x^7 + 7*x^8 + ...
		

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(2+2*x+x^2)/(1-x^2-x^3+x^5)));  // G. C. Greubel, Aug 06 2018
  • Maple
    A242774:=n->ceil(n/2)+ceil(n/3): seq(A242774(n), n=1..100); # Wesley Ivan Hurt, Apr 13 2016
  • Mathematica
    a[ n_] := Ceiling[ n / 2 ] + Ceiling[ n / 3 ];
    LinearRecurrence[{0, 1, 1, 0, -1}, {2, 2, 3, 4, 5}, 100] (* Vincenzo Librandi, Apr 15 2016 *)
    Rest[CoefficientList[Series[x*(2+2*x+x^2)/(1-x^2-x^3+x^5), {x, 0, 50}], x]] (* G. C. Greubel, Aug 06 2018 *)
  • PARI
    {a(n) = ceil( n / 2 ) + ceil( n / 3 )};
    
  • PARI
    {a(n) = if( n<0, polcoeff( -(x^2 + 2*x^3 + 2*x^4) / ((1 - x^2) * (1 - x^3)) + x * O(x^-n), -n), polcoeff( (2*x + 2*x^2 + x^3) / ((1 - x^2) * (1 - x^3)) + x * O(x^n), n))};
    

Formula

G.f.: x * (2 + 2*x + x^2) / (1 - x^2 - x^3 + x^5) = (2*x + 2*x^2 + x^3) / ((1 - x^2) * (1 - x^3)).
a(n) = - A010761(-n) = 2 - a(1-n). a(n) = A002789(n) - A002789(n-1) for all n in Z.
a(n) = Sum_{k=1..n} A000035(k) + A000035(A010872(k)). - Benedict W. J. Irwin, Apr 13 2016
E.g.f.: 5*x*exp(x)/6 - exp(-x)/4 + 7*exp(x)/12 + sin(sqrt(3)*x/2)*exp(-x/2)/(3*sqrt(3)) - cos(sqrt(3)*x/2)*exp(-x/2)/3. - Ilya Gutkovskiy, Apr 13 2016

A002797 Number of solutions to a linear inequality.

Original entry on oeis.org

3, 2, 5, 9, 17, 27, 40, 55, 73, 94, 117, 143, 171, 203, 236, 273, 311, 354, 397, 445, 493, 547, 600, 659, 717, 782, 845, 915, 983, 1059, 1132, 1213, 1291, 1378, 1461, 1553, 1641, 1739, 1832, 1935, 2033, 2142, 2245, 2359, 2467, 2587, 2700
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • PARI
    Vec(-(5*x^6+7*x^5+2*x^4+5*x^3-x+3)/((x^2+1)*(x+1)^2*(x-1)^3) + O(x^50)) \\ Michel Marcus, Jan 26 2015

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7). - Sean A. Irvine, Aug 20 2014
G.f.: -(5*x^6+7*x^5+2*x^4+5*x^3-x+3)/((x^2+1)*(x+1)^2*(x-1)^3). - Alois P. Heinz, Aug 20 2014

Extensions

Initial term, missing a(9), and more terms from Sean A. Irvine, Aug 20 2014
Showing 1-4 of 4 results.