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.

A054925 a(n) = ceiling(n*(n-1)/4).

Original entry on oeis.org

0, 0, 1, 2, 3, 5, 8, 11, 14, 18, 23, 28, 33, 39, 46, 53, 60, 68, 77, 86, 95, 105, 116, 127, 138, 150, 163, 176, 189, 203, 218, 233, 248, 264, 281, 298, 315, 333, 352, 371, 390, 410, 431, 452, 473, 495, 518, 541, 564, 588, 613, 638, 663, 689, 716, 743, 770, 798
Offset: 0

Views

Author

N. J. A. Sloane, May 24 2000

Keywords

Comments

Number of edges in "median" graph - gives positions of largest entries in rows of table in A054924.
Form the clockwise spiral starting 0,1,2,....; then A054925(n+1) interleaves 2 horizontal (A033951, A033991) and 2 vertical (A007742, A054552) branches. A bisection is A014848. - Paul Barry, Oct 08 2007
Consider the standard 4-dimensional Euclidean lattice. We take 1 step along the positive x-axis, 2 along the positive y-axis, 3 along the positive z-axis, 4 along the positive t-axis, and then back round to the x-axis. This sequence gives the floor of the Euclidean distance to the origin after n steps. - Jon Perry, Apr 16 2013
Jon Perry's JavaScript code is explained by A238604. - Michael Somos, Mar 01 2014
Ceiling of the area under the polygon connecting the lattice points (n, floor(n/2)) from 0..n. - Wesley Ivan Hurt, Jun 09 2014
Ceiling of one-half of each triangular number. - Harvey P. Dale, Oct 03 2016
For n > 2, also the edge cover number of the (n-1)-triangular honeycomb queen graph. - Eric W. Weisstein, Jul 14 2017
Conjecture: For n>11, there always exists a prime number p such that a(n)Raul Prisacariu, Sep 01 2024
For n = 1 up to at least n = 13, also the lower matching number of the triangular honeycomb bishop graph. - Eric W. Weisstein, Dec 13 2024
Conjecturally, apart from the first term, the sequence terms are the exponents in the expansion of Sum_{n >= 0} q^(3*n) * (Product_{k >= 2*n+1} 1 - q^k) = 1 - q - q^2 + q^3 + q^5 - q^8 - q^11 + + - - .... Cf. A039825. - Peter Bala, Apr 13 2025

Examples

			a(6) = 8; ceiling(6*(6-1)/4) = ceiling(30/4) = 8.
G.f. = x^2 + 2*x^3 + 3*x^4 + 5*x^5 + 8*x^6 + 11*x^7 + 14*x^8 + 18*x^9 + 23*x^10 + ...
		

Crossrefs

Programs

  • JavaScript
    p=new Array(0,0,0,0);
    for (a=0;a<100;a++) {
    p[a%4]+=a;
    document.write(Math.floor(Math.sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]+p[3]*p[3]))+", ");
    } /* Jon Perry, Apr 16 2013 */
    
  • Magma
    [ Ceiling(n*(n-1)/4) : n in [0..50] ]; // Wesley Ivan Hurt, Jun 09 2014
    
  • Magma
    I:=[0,0,1,2,3]; [n le 5 select I[n] else 3*Self(n-1)-4*Self(n-2)+4*Self(n-3)-3*Self(n-4)+Self(n-5): n in [1..60]]; // Vincenzo Librandi, Jul 14 2015
  • Maple
    seq(ceil(binomial(n,2)/2), n=0..57); # Zerinvary Lajos, Jan 12 2009
  • Mathematica
    Table[Ceiling[(n^2 - n)/4], {n, 0, 20}] (* Wesley Ivan Hurt, Nov 01 2013 *)
    LinearRecurrence[{3, -4, 4, -3, 1}, {0, 0, 1, 2, 3}, 60] (* Vincenzo Librandi, Jul 14 2015 *)
    Join[{0}, Ceiling[#/2] &/ @ Accumulate[Range[0, 60]]] (* Harvey P. Dale, Oct 03 2016 *)
    Ceiling[Binomial[Range[0, 20], 2]/2] (* Eric W. Weisstein, Dec 13 2024 *)
    Table[Ceiling[Binomial[n, 2]/2], {n, 0, 20}] (* Eric W. Weisstein, Dec 13 2024 *)
    Table[(1 + (n - 1) n - Cos[n Pi/2] - Sin[n Pi/2])/4, {n, 0, 20}] (* Eric W. Weisstein, Dec 13 2024 *)
    CoefficientList[Series[x^2 (-1 + x - x^2)/((-1 + x)^3 (1 + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Dec 13 2024 *)
  • PARI
    {a(n) = ceil( n * (n-1)/4)}; /* Michael Somos, Feb 11 2004 */
    
  • Sage
    [ceil(binomial(n,2)/2) for n in range(0,58)] # Zerinvary Lajos, Dec 01 2009
    

Formula

Euler transform of length 6 sequence [ 2, 0, 1, 1, 0, -1]. - Michael Somos, Sep 02 2006
From Michael Somos, Feb 11 2004: (Start)
G.f.: x^2 * (x^2 - x + 1) / ((1 - x)^3 * (1 + x^2)) = x^2 * (1 - x^6) / ((1 - x)^2 * (1 - x^3) * (1 - x^4)).
a(1-n) = a(n).
A011848(n) = a(-n). (End)
From Michael Somos, Mar 01 2014: (Start)
a(n + 4) = a(n) + 2*n + 3.
a(n+1) = floor( sqrt( A238604(n))). (End)
a(n) = A011848(n) + A133872(n+2). - Wesley Ivan Hurt, Jun 09 2014
Sum_{n>=2} 1/a(n) = 4 - Pi + 2*Pi*sinh(sqrt(7)*Pi/4)/(sqrt(7)*(1/sqrt(2)+cosh(sqrt(7)*Pi/4))). - Amiram Eldar, Dec 23 2024