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

A004652 Expansion of x*(1+x^2+x^4)/((1-x)*(1-x^2)*(1-x^3)).

Original entry on oeis.org

0, 1, 1, 3, 4, 7, 9, 13, 16, 21, 25, 31, 36, 43, 49, 57, 64, 73, 81, 91, 100, 111, 121, 133, 144, 157, 169, 183, 196, 211, 225, 241, 256, 273, 289, 307, 324, 343, 361, 381, 400, 421, 441, 463, 484, 507, 529, 553, 576, 601, 625, 651, 676, 703, 729, 757, 784, 813
Offset: 0

Views

Author

Keywords

Comments

As a Molien series this arises as (1+x^12)/((1-x^4)*(1-x^8)^2).
Starting (1, 3, 4, ...) = row sums of an infinite triangle with alternate columns of (1, 2, 3, ...) and (1, 0, 0, 0, ...). - Gary W. Adamson, May 14 2010
a(n) is also the number of inequivalent (modulo C_4 rotations) square n X n grids with squares coming in two colors and one square has one of the colors. See the formula from A054772. - Wolfdieter Lang, Oct 03 2016
Also the genus of the complete bipartite graph K_{n+2,n+2}. - Eric W. Weisstein, Jan 19 2018

Examples

			From _Gary W. Adamson_, May 14 2010: (Start)
First few rows of the generating triangle =
1;
2, 1;
3, 0, 1;
4, 0, 2, 1;
5, 0, 3, 0, 1;
6, 0, 4, 0, 2, 1;
7, 0, 5, 0, 3, 0, 1;
8, 0, 6, 0, 4, 0, 2, 1;
...
Example: a(7) = 13 = (6 + 0 + 4 + 0 + 2 + 1). (End)
x + x^2 + 3*x^3 + 4*x^4 + 7*x^5 + 9*x^6 + 13*x^7 + 16*x^8 + 21*x^9 + ...
		

Crossrefs

First differences give A028242. Cf. A035104, A035106.
A002061(n)=a(2*n-1). A035104(n)=a(n+7)-12. A035106(n)=a(n+3)-1.
Column 1 of A195040. - Omar E. Pol, Sep 28 2011
Cf. A054772, column 2.

Programs

  • Haskell
    a004652 = ceiling . (/ 4) . fromIntegral . (^ 2)
    a004652_list = 0 : 1 : zipWith (+) a004652_list [1..]
    -- Reinhard Zumkeller, Dec 18 2013
  • Magma
    [Ceiling(n^2/4): n in [0..60] ]; // Vincenzo Librandi, Aug 19 2011
    
  • Maple
    with(combstruct):ZL:=[st,{st=Prod(left,right),left=Set(U,card=r),right=Set(U,card=2)}, unlabeled]: subs(r=1,stack): seq(count(subs(r=2,ZL),size=m+3),m=0..57) ; # Zerinvary Lajos, Mar 09 2007
  • Mathematica
    CoefficientList[Series[x (1 - x + x^2)/((1 - x)^2*(1 - x^2)), {x, 0, 57}], x] (* Michael De Vlieger, Oct 03 2016 *)
    Table[Ceiling[n^2/4], {n, 0, 20}] (* Eric W. Weisstein, Jan 19 2018 *)
    Ceiling[Range[0, 20]^2/4] (* Eric W. Weisstein, Jan 19 2018 *)
    LinearRecurrence[{2, 0, -2, 1}, {1, 1, 3, 4}, {0, 20}] (* Eric W. Weisstein, Jan 19 2018 *)
  • PARI
    {a(n) = ceil(n^2 / 4)}
    

Formula

a(n) = ceiling(n^2/4).
a(-n) = a(n).
G.f.: x * (1 - x + x^2) / ((1 - x)^2 * (1 - x^2)).
a(n) = a(n-1) + a(n-2) - a(n-3) + 1. a(2*n) = n^2, a(2*n-1) = n^2 - n + 1. - Michael Somos, Apr 21 2000
Interleaves square numbers with centered polygonal numbers: a(2*n)=A000290(n), a(2*n+1)=A002061(n+1). - Paul Barry, Mar 13 2003
For n > 1: a(n) is the digit reversal of n in base A008619(n), where a(n) is written in base 10. - Naohiro Nomoto, Mar 15 2004
a(n) = a(n-2) + n - 1. - Paul Barry, Jul 14 2004
Euler transform of length 6 sequence [ 1, 2, 1, 0, 0, -1]. - Michael Somos, Apr 03 2007
Starting (1, 3, 4, 7, 9, 13, ...), row sums of triangle A135840. - Gary W. Adamson, Dec 01 2007
a(n) = (3/8)*(-1)^(n+1) + 5/8 - (3/4)*(n+1) + (1/4)*(n+2)*(n+1). - Richard Choulet, Nov 27 2008
a(n) = n^2/4 - 3*((-1)^n-1)/8. - Omar E. Pol, Sep 28 2011
a(n) = -n + floor( (n+1)(n+3)/4 ). - Wesley Ivan Hurt, Jun 23 2013
a(n) = A054772(n, 1) = A054772(n, n^2-1), n >= 1. - Wolfdieter Lang, Oct 03 2016
E.g.f.: (x*(x + 1)*exp(x) + 3*sinh(x))/4. - Ilya Gutkovskiy, Oct 03 2016
a(n) = binomial(floor((n+3)/2),2) + binomial(floor((n+(-1)^n)/2),2). - Yuchun Ji, Feb 03 2021

A035106 1, together with numbers of the form k*(k+1) or k*(k+2), k > 0.

Original entry on oeis.org

1, 2, 3, 6, 8, 12, 15, 20, 24, 30, 35, 42, 48, 56, 63, 72, 80, 90, 99, 110, 120, 132, 143, 156, 168, 182, 195, 210, 224, 240, 255, 272, 288, 306, 323, 342, 360, 380, 399, 420, 440, 462, 483, 506, 528, 552, 575, 600, 624, 650, 675, 702, 728, 756, 783, 812, 840
Offset: 1

Views

Author

N. J. A. Sloane, revised Oct 30 2001

Keywords

Comments

Largest integer m such that every permutation (p_1, ..., p_n) of (1, ..., n) satisfies p_i * p_{i+1} >= m for some i, 1 <= i <= n-1. Equivalently, smallest integer m such that there exists a permutation (p_1, ..., p_n) of (1, ..., n) satisfying p_i * p_{i+1} <= m for every i, 1 <= i <= n-1.
Also, nonsquare positive integers m such that floor(sqrt(m)) divides m. - Max Alekseyev, Nov 27 2006
Also, for n>1, a(n) is the number of non-isomorphic simple connected undirected graphs having n+1 edges and a longest path of length n. - Nathaniel Gregg, Nov 02 2021

Examples

			n=5: we must arrange the numbers 1..5 so that the max of the products of pairs of adjacent terms is minimized. The answer is 51324, with max product = 8, so a(5) = 8.
		

Crossrefs

First differences give (essentially) A028242.
Bisections: A002378 (pronic numbers) and A005563.

Programs

  • GAP
    Concatenation([1], List([2..60], n-> (2*n*(n+2) +3*((-1)^n -1))/8)); # G. C. Greubel, Jun 10 2019
  • Haskell
    import Data.List.Ordered (union)
    a035106 n = a035106_list !! (n-1)
    a035106_list = 1 : tail (union a002378_list a005563_list)
    -- Reinhard Zumkeller, Oct 05 2015
    
  • Magma
    [1] cat [(2*n*(n+2) +3*((-1)^n -1))/8: n in [2..60]]; // G. C. Greubel, Jun 10 2019
    
  • Mathematica
    Join[{1},LinearRecurrence[{2,0,-2,1},{2,3,6,8},60]] (* or *) Join[{1}, Table[ If[EvenQ[n],(n(n+2))/4,((n-1)(n+3))/4],{n,2,60}]] (* Harvey P. Dale, May 03 2012 *)
  • PARI
    my(x='x+O('x^60)); Vec(x*(x^4-2*x^3+x^2-1)/((x-1)^3*(x+1))) \\ Altug Alkan, Oct 23 2015
    
  • PARI
    A035106(n)=!(n-1)+floor((n^2)/4+n/2); \\ R. J. Cano, Jul 24 2023
    
  • Sage
    [1]+[(2*n*(n+2) +3*((-1)^n -1))/8 for n in (2..60)] # G. C. Greubel, Jun 10 2019
    

Formula

For n > 1, a(n) = n*(n+2)/4 if n is even and (n-1)*(n+3)/4 if n is odd. - Jud McCranie, Oct 25 2001
a(n) = a(n-1) + a(n-2) - a(n-3) + 1 = A002620(n+2) + A004526(n+2). - Henry Bottomley, Mar 08 2000
a(n+2) = (2*n^2 + 12*n + 3*(-1)^n + 13)/8, with a(1)=1, i.e., a(n+2) = (n+2)*(n+4)/4 if n is even and (n+1)*(n+5)/4 if n is odd. - Vladeta Jovovic, Oct 23 2001
From Cecilia Rossiter (cecilia(AT)noticingnumbers.net), Dec 14 2004: (Start)
a(n) = a(n-2) + (n-1), where a(1) = 0, a(2) = 0.
a(n) = (2*(n+1)^2 + 3*(-1)^n - 5)/8, n>=2, with a(1)=1. (End)
For n > 1, a(n) = floor((n+1)^4/(4*(n+1)^2+1)). - Gary Detlefs, Feb 11 2010
For n > 1, a(n) = n + ceiling((1/4)*(n-1)^2) - 1. - Clark Kimberling, Jan 07 2011; corrected by Arkadiusz Wesolowski, Sep 25 2012
a(1)=1, a(2)=2, a(3)=3, a(4)=6, a(5)=8; for n > 5, a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Harvey P. Dale, May 03 2012
G.f.: x + x^2*(2-x) / ( (1+x)*(1-x)^3 ) = x*(x^4 - 2*x^3 + x^2 - 1)/((x-1)^3*(x+1)). - Vladeta Jovovic, Oct 23 2001; Harvey P. Dale, May 03 2012
a(n) = floor(n/2)*(1 + ceiling(n/2)), a(1) = 1. - Arkadiusz Wesolowski, Sep 25 2012
a(n) = ceiling((n-1)*(n+3)/4), n > 1. - Wesley Ivan Hurt, Jun 14 2013
a(n+1) - a(n) = A052938(n-2) for n > 1. - Reinhard Zumkeller, Oct 06 2015
E.g.f.: (8*x + 3*exp(-x) - (3-6*x-2*x^2)*exp(x))/8. - G. C. Greubel, Jun 10 2019
Sum_{n>=1} 1/a(n) = 11/4. - Amiram Eldar, Sep 24 2022

Extensions

Edited by Max Alekseyev, Oct 09 2015
Definition modified to allow for the initial 1. - N. J. A. Sloane, May 17 2016

A035107 First differences give (essentially) A028242.

Original entry on oeis.org

3, 9, 17, 29, 44, 64, 88, 118, 153, 195, 243, 299, 362, 434, 514, 604, 703, 813, 933, 1065, 1208, 1364, 1532, 1714, 1909, 2119, 2343, 2583, 2838, 3110, 3398, 3704, 4027, 4369, 4729, 5109, 5508, 5928, 6368, 6830, 7313, 7819, 8347, 8899, 9474
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(4*n^3+54*n^2+212*n+153-9*(-1)^n)/48: n in [0..50]]; // Vincenzo Librandi, Oct 21 2013
  • Mathematica
    LinearRecurrence[{3,-2,-2,3,-1},{3,9,17,29,44},50] (* Harvey P. Dale, Oct 20 2013 *)
    CoefficientList[Series[(2 x^3 - 4 x^2 + 3)/((x - 1)^4 (x + 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 21 2013 *)

Formula

a(n) = (4*n^3 +54*n^2 +212*n +153 -9*(-1)^n)/48.
G.f.: (2*x^3-4*x^2+3) / ((x-1)^4*(x+1)). - Colin Barker, Mar 04 2013
Showing 1-3 of 3 results.