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.

A007590 a(n) = floor(n^2/2).

Original entry on oeis.org

0, 0, 2, 4, 8, 12, 18, 24, 32, 40, 50, 60, 72, 84, 98, 112, 128, 144, 162, 180, 200, 220, 242, 264, 288, 312, 338, 364, 392, 420, 450, 480, 512, 544, 578, 612, 648, 684, 722, 760, 800, 840, 882, 924, 968, 1012, 1058, 1104, 1152, 1200, 1250, 1300, 1352, 1404
Offset: 0

Views

Author

Keywords

Comments

Arithmetic mean of a pair of successive triangular numbers. - Amarnath Murthy, Jul 24 2005
Maximum sum of absolute differences of cyclically adjacent elements in a permutation of (1..n). For example, with n = 9, permutation (1,9,2,8,3,7,4,6,5) has adjacent differences (8,7,6,5,4,3,2,1,4) with maximal sum a(9) = 40. - Joshua Zucker, Dec 15 2005
a(n) = maximum number of non-overlapping 1 X 2 rectangles that can be packed into an n X n square. Rectangles can only be placed parallel to the sides of the square. Verified with Lobato's tool, see links. - Dmitry Kamenetsky, Aug 03 2009 [This is easily provable - David W. Wilson, Jan 25 2014]
Number of strictly increasing arrangements of 3 nonzero numbers in -(n+1)..(n+1) with sum zero. For example, a(2) = 2 has two solutions: (-3, 1, 2) and (-2, -1, 3) each add to zero. - Michael Somos, Apr 11 2011
For n >= 4 is a(n) the minimal value v such that v = Sum_{i in S1} i = Product_{j in S2} j with disjoint union of S1, S2 = {1, 2, ..., n+1}. Example: a(4) = 8 = 3+5 = 1*2*4. - Claudio Meller, May 27 2012
Sum_{n > 1} 1/a(n) = (zeta(2) + 1)/2. - Enrique Pérez Herrero, Jun 19 2013
Apart from the initial term this is the elliptic troublemaker sequence R_n(2,4) in the notation of Stange (see Table 1, p. 16). For other elliptic troublemaker sequences R_n(a,b) see the cross references below. - Peter Bala, Aug 12 2013
Maximum sum of displacements of elements in a permutation of (1..n). For example, with n = 9, permutation (5,6,7,8,9,1,2,3,4) has displacements (4,4,4,4,4,5,5,5,5) with maximal sum a(9) = 40. - David W. Wilson, Jan 25 2014
A245575(a(n)) mod 2 = 1, or for n > 0, where odd terms occur in A245575. - Reinhard Zumkeller, Aug 05 2014
Also the matching number of the n X n king, rook, and rook complement graphs. - Eric W. Weisstein, Jun 20 and Sep 14 2017
For n > 1, also the vertex count of the n X n white bishop graph. - Eric W. Weisstein, Jun 27 2017
This is also the number of distinct ways n^2 can be represented as the sum of two positive integers. - William Boyles, Jan 15 2018
Also the crossing number of the complete bipartite graph K_{4,n+1}. - Eric W. Weisstein, Sep 11 2018
The sequence can be obtained from A033429 by deleting the last digit of each term. - Bruno Berselli, Sep 11 2019
Starting at n=2, the number of facets of the n-dimensional Kunz cone C_(n+1). - Emily O'Sullivan, Jul 08 2023

Examples

			a(3) = 4 because 3^2/2 = 9/2 = 4.5 and floor(4.5) = 4.
a(4) = 8 because 4^2/2 = 16/2 = 8.
a(5) = 12 because 5^2/2 = 25/2 = 12.5 and floor(12.5) = 12.
		

References

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

Crossrefs

Column 3 of triangle A094953.
For n > 2: a(n) = sum of (n-1)-th row in triangle A101037.
A080476 is essentially the same sequence.
Cf. A000982.
Elliptic troublemaker sequences: A000212 (= R_n(1,3) = R_n(2,3)), A002620 (= R_n(1,2)), A030511 (= R_n(2,6) = R_n(4,6)), A033436 (= R_n(1,4) = R_n(3,4)), A033437 (= R_n(1,5) = R_n(4,5)), A033438 (= R_n(1,6) = R_n(5,6)), A033439 (= R_n(1,7) = R_n(6,7)), A184535 (= R_n(2,5) = R_n(3,5)).
Cf. A182834 (complement), A245575.
First differences: A052928(n+1), is first differences of A212964; partial sums: A212964(n+1), is partial sums of A052928. - Guenther Schrack, Dec 10 2017
Cf. A033429 (5*n^2).

Programs

  • Haskell
    a007550 = flip div 2 . (^ 2)  -- Reinhard Zumkeller, Aug 05 2014
    
  • Haskell
    a007590 = 0 : 0 : 0 : [ a1 + a2 - a3 + 2 | (a1, a2, a3) <- zip3 (tail (tail a007590)) (tail a007590) a007590 ] -- Luc Duponcheel, Sep 30 2020
    
  • Magma
    [Floor(n^2/2): n in [0..53]]; // Bruno Berselli, Mar 28 2011
    
  • Magma
    [Binomial(n,2)+Floor(n/2): n in [0..60]]; // Bruno Berselli, Jun 08 2017
    
  • Maple
    A007590:=n->floor(n^2/2); seq(A007590(k), k=0..100); # Wesley Ivan Hurt, Oct 29 2013
  • Mathematica
    Floor[Range[0, 53]^2/2] (* Alonso del Arte, Aug 07 2013 *)
    Table[Binomial[n, 2] + Floor[n/2], {n, 0, 60}] (* Bruno Berselli, Jun 08 2017 *)
    LinearRecurrence[{2, 0, -2, 1}, {0, 2, 4, 8}, 20] (* Eric W. Weisstein, Sep 14 2017 *)
    CoefficientList[Series[-2 x/((-1 + x)^3 (1 + x)), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 14 2017 *)
    Table[Floor[n^2/2], {n, 0, 20}] (* Eric W. Weisstein, Sep 11 2018 *)
  • PARI
    {a(n) = n^2 \ 2}
    
  • PARI
    {a(n) = local(v, c, m); m = n+1; forvec( v = vector( 3, i, [-m, m]), if( 0==prod( k=1, 3, v[k]), next); if( 0==sum( k=1, 3, v[k]), c++), 2); c} /* Michael Somos, Apr 11 2011 */
    
  • PARI
    first(n) = Vec(2*x^2/((1+x)*(1-x)^3) + O(x^n), -n); \\ Iain Fox, Dec 11 2017
    
  • Python
    def A007590(n): return n**2//2 # Chai Wah Wu, Jun 07 2022

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) + 2 = 2*A002620(n) = A000217(n+1) + A004526(n). - Henry Bottomley, Mar 08 2000
a(n+1) = Sum_{k=1..n} (k + (k mod 2)). Therefore a(n) = Sum_{k=1..n} 2*floor(k/2). - William A. Tedeschi, Mar 19 2008
From R. J. Mathar, Nov 22 2008: (Start)
G.f.: 2*x^2/((1+x)*(1-x)^3).
a(n+1) - a(n) = A052928(n+1). (End)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - R. H. Hardin, Mar 28 2011
a(n) = (2*n^2 + (-1)^n - 1)/4. - Bruno Berselli, Mar 28 2011
a(n) = ceiling((n^2-1)/2) = binomial(n+1, 2) - ceiling(n/2). - Wesley Ivan Hurt, Mar 08 2014, Jun 14 2013
a(n+1) = A014105(n) - A032528(n). - Richard R. Forberg, Aug 07 2013
a(n) = binomial(n,2) + floor(n/2). - Bruno Berselli, Jun 08 2017
a(n) = A099392(n+1) - 1. - Guenther Schrack, Dec 10 2017
E.g.f.: (x*(x + 1)*cosh(x) + (x^2 + x - 1)*sinh(x))/2. - Stefano Spezia, May 06 2021
From Amiram Eldar, Mar 20 2022: (Start)
Sum_{n>=2} 1/a(n) = Pi^2/12 + 1/2.
Sum_{n>=2} (-1)^n/a(n) = Pi^2/12 - 1/2. (End)

Extensions

Edited by Charles R Greathouse IV, Apr 20 2010

A078633 Smallest number of sticks of length 1 needed to construct n squares with sides of length 1.

Original entry on oeis.org

4, 7, 10, 12, 15, 17, 20, 22, 24, 27, 29, 31, 34, 36, 38, 40, 43, 45, 47, 49, 52, 54, 56, 58, 60, 63, 65, 67, 69, 71, 74, 76, 78, 80, 82, 84, 87, 89, 91, 93, 95, 97, 100, 102, 104, 106, 108, 110, 112, 115, 117, 119, 121, 123, 125, 127, 130, 132, 134, 136, 138, 140, 142
Offset: 1

Views

Author

Mambetov Timur and Takenov Nurdin (timur_teufel(AT)mail.ru), Dec 12 2002

Keywords

Comments

A182834(a(n)) mod 2 = 0, or, where even terms occur in A182834. - Reinhard Zumkeller, Aug 05 2014

Examples

			a(2)=7 because we have following construction:
   _ _
  |_|_|
		

Crossrefs

Programs

  • Haskell
    a078633 n = 2 * n + ceiling (2 * sqrt (fromIntegral n))
    -- Reinhard Zumkeller, Aug 05 2014
    
  • Mathematica
    Table[2n+Ceiling[2Sqrt[n]],{n,70}] (* Harvey P. Dale, Jun 20 2011 *)
  • PARI
    a(n) = 2*n + ceil(2*sqrt(n)); \\ Michel Marcus, Mar 26 2018
    
  • Python
    from math import isqrt
    def A078633(n): return (m:=n<<1)+1+isqrt((m<<1)-1) # Chai Wah Wu, Jul 28 2022

Formula

a(n) = 2*n + ceiling(2*sqrt(n)) = 2*n + A027434(n).
a(n) = (4*n + A027709(n))/2. - Tanya Khovanova, Mar 07 2008

A245575 Number of ways of writing n as the sum of two quarter-squares (cf. A002620).

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 4, 2, 3, 2, 4, 2, 3, 4, 2, 2, 4, 2, 5, 0, 4, 4, 4, 0, 3, 4, 4, 2, 2, 4, 2, 4, 5, 0, 4, 0, 6, 4, 2, 2, 3, 2, 6, 2, 2, 4, 4, 0, 4, 2, 5, 4, 2, 2, 2, 4, 4, 2, 6, 0, 3, 4, 4, 0, 2, 6, 4, 2, 4, 2, 2, 0, 7, 4, 4, 0, 6, 0, 4, 2, 2, 6, 2, 2, 5, 4
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 04 2014

Keywords

Comments

a(n) is also the number of times n appears in the triangle A338796, or equivalently, the number of positive integer solutions of the equation A338796(x, y) = n for y <= x. - Stefano Spezia, Mar 03 2022

Examples

			a(10) = #{9+1, 6+4, 4+6, 1+9} = 4;
a(11) = #{9+2, 2+9} = 2;
a(12) = #{12+0, 6+6, 0+12} = 3;
a(13) = #{12+1, 9+4, 4+9, 1+12} = 4;
a(14) = #{6+1, 1+6} = 2;
a(15) = #{9+6, 6+9} = 2;
a(16) = #{16+0, 12+4, 4+12, 0+16} = 4;
a(17) = #{16+1, 1+16} = 2;
a(18) = #{16+2, 12+6, 9+9, 6+12, 2+16} = 5;
a(19) = #{} = 0;
a(20) = #{20+0, 16+4, 4+16, 0+20} = 4.
		

Crossrefs

Programs

  • Haskell
    a245575 n = a245575_list !! n
    a245575_list = f 0 [] $ tail a002620_list where
       f u vs ws'@(w:ws)
         | u < w     = (sum $ map (a240025 . (u -)) vs) : f (u + 1) vs ws'
         | otherwise = f u (w : vs) ws
  • Mathematica
    qsQ[n_] := qsQ[n] = With[{s = Sqrt[n]}, Which[IntegerQ[s], True, n == Floor[s] (Floor[s]+1), True, True, False]]; a[n_] := Count[Range[0, n], k_ /; qsQ[k] && qsQ[n-k]]; Array[a, 100, 0] (* Jean-François Alcover, May 08 2017 *) (* or *)
    u[{x_,y_}] := 2-Boole[x==y]; a[n_] := Total[u /@ IntegerPartitions[n, {2}, Floor[Range[1 + 2 Sqrt@ n]^2/4]]]; Array[a, 100, 0] (* Giovanni Resta, May 08 2017 *)

Formula

a(A182834(n)) mod 2 = 0; a(A007550(n)) mod 2 = 1;
a(A240952(n)) = n and a(A240952(m)) <> n for m < a(n);
a(A245585(n)) = 0.

A349080 Numbers k for which there exists only one integer m with 1 <= m <= k such that A000178(k) / m! is a square, where A000178(k) = k$ = 1!*2!*...*k! is the superfactorial of k.

Original entry on oeis.org

1, 2, 4, 12, 18, 20, 24, 28, 34, 36, 40, 44, 52, 56, 60, 62, 64, 68, 76, 80, 84, 88, 92, 98, 100, 104, 108, 112, 116, 120, 124, 132, 136, 140, 142, 144, 148, 152, 156, 164, 168, 172, 176, 180, 184, 188, 192, 194, 196, 204, 208, 212, 216, 220, 224, 228, 232, 236, 244, 248, 252, 254, 256
Offset: 1

Views

Author

Bernard Schott, Nov 20 2021

Keywords

Comments

This sequence is the union of {1} and of three infinite and disjoint subsequences.
-> Numbers k divisible by 4 but not of the form 8q^2 or 8q(q+1) = {4, 12, 20, 24, 28, ...} (see A182834). For these numbers, the corresponding unique m = k/2 (see example for k = 4).
-> Even numbers k not divisible by 4 and of the form k = 2*A055792 = 2*q^2, q>1 in A001541 = {18, 578, ...}. For these numbers, the corresponding unique m = k/2 - 2 = q^2-2 (see example for k = 18)
-> Even numbers k not divisible by 4, that are in A060626 but not of the form k=2q^2-4 with q>1 in A001541 = {2, 34, 62, 98, 142, 194, ...} (A349496). For these numbers, the corresponding unique m = k/2 + 1 (see example for k = 2).
See A348692 for further information.

Examples

			For k = 2, 2$ / 2! = 1^2, hence 2 is a term.
For k = 4, 4$ /1! = 288, 4$ / 3! = 48, 4$ / 4! = 12 but for m = 2, 4$ / 2! = 12^2, hence 4 is a term.
For k = 18 and m = 7, we have 18$ / 7! = 29230177671473293820176594405114531928195727360000000000000^2 and there is no other solution m, hence 18 is a term.
		

Crossrefs

Programs

Showing 1-4 of 4 results.