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-10 of 12 results. Next

A133872 Period 4: repeat [1, 1, 0, 0].

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1
Offset: 0

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Partial sums of A056594.
Let i=sqrt(-1) and S(n) = Sum_{k=0..n-1} exp(2*Pi*i*k^2/n) for n>=1 the famous Gauss sum. Then S(n) = (a(n)+a(n+1)*i)*sqrt(n). - Franz Vrabec, Nov 08 2007
a(A042948(n)) = 1; a(A042964(n)) = 0. - Reinhard Zumkeller, Oct 03 2008
a(n) is also the real part of partial sum of powers of the complex unit i. - Enrique Pérez Herrero, Aug 16 2009
Periodic sequences having a period of 2k and composed of k ones followed by k zeros have a closed formula of floor(((n+k) mod 2k)/k). Listed sequences of this form are: k=1..A000035(n+1), k=2..A133872(n), k=3..A088911, k=4..A131078(n), k=5..A112713(n-1). - Gary Detlefs, May 17 2011
0.repeat(0,0,1,1) is 1/5 in base 2, due to 1/5 = (3/16)/(1-1/16). For the general case see 1/A062158(n) in base n >= 2. Here n = 2. - Wolfdieter Lang, Jun 20 2014
a(n) (for n>=1) is the determinant of the n X n Toeplitz matrix M satisfying: M(i,j)=1 if -1<=j-i<=2 and 0 otherwise. - Dmitry Efimov, Jun 23 2015
a(n) (for n>=1) is the difference between numbers of even and odd permutations p of 1,2,...,n such that -1 <= p(i)-i <= 2 for i=1,2,...,n. - Dmitry Efimov, Jan 08 2016
The binomial transform is 1, 2, 3, 4, 6, 12,... (see A038504). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 + x + x^4 + x^5 + x^8 + x^9 + x^12 + x^13 + x^16 + x^17 + x^20 + ...
		

Crossrefs

Programs

Formula

a(n) = (1 + floor(n/2)) mod 2.
a(n) = A004526(A000035(n+2)).
a(n) = 1 + floor(n/2) - 2*floor((n+2)/4).
a(n) = (((n+2) mod 4) - (n mod 2))/2.
a(n) = ((n + 2 - (n mod 2))/2) mod 2.
a(n) = ((2*n + 3 + (-1)^n)/4) mod 2.
a(n) = (1 + (-1)^((2*n - 1 + (-1)^n)/4))/2.
a(n) = binomial(n+2, n) mod 2 = binomial(n+2, 2) mod 2.
a(n) = A000217(n+1) mod 2.
G.f.: (1+x)/(1-x^4) = 1/((1-x)(1+x^2)).
a(n) = 1/2 + (1/2)*cos(Pi*n/2) + (1/2)*sin(Pi*n/2). a(n) = A021913(n+2). - R. J. Mathar, Nov 15 2007
From Jaume Oliver Lafont, Dec 05 2008: (Start)
a(n) = 1/2 + sin((2n+1)Pi/4)/sqrt(2).
a(n) = 1/2 + cos((2n-1)Pi/4)/sqrt(2). (End)
a(n) = Re(Sum_{k=0..n} i^k), where i=sqrt(-1) and Re is the real part of a complex number. a(n) = (1/2)*((Sum_{k=0..n} i^k) + Sum_{k=0..n} i^-k) = Re((1/2)*(1 + i)*(1 - i^(n+1))). - Enrique Pérez Herrero, Aug 16 2009
a(n) = (1 + i^(n*(n-1)))/2, where i=sqrt(-1). - Bruno Berselli, May 18 2011
a(n) = (Sum_{k=1..n} k^j) mod 2, for any j. - Gary Detlefs, Dec 28 2011
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2. - Jean-Christophe Hervé, May 01 2013
a(n) = 1 - floor(n/2) + 2*floor(n/4) = 1 - A004526(n) + A122461(n). - Wesley Ivan Hurt, Dec 06 2013
a(n) = (1 + (-1)^floor(n/2))/2. - Wesley Ivan Hurt, Apr 17 2014
a(n) = A054925(n+2) - A011848(n+2). - Wesley Ivan Hurt, Jun 09 2014
Euler transform of length 4 sequence [1, -1, 0, 1]. - Michael Somos, Sep 26 2014
a(n) = a(1-n) for all n in Z. - Michael Somos, Sep 26 2014
From Ilya Gutkovskiy, Jul 09 2016: (Start)
Inverse binomial transform of A038504(n+1).
E.g.f.: (exp(x) + sin(x) + cos(x))/2. (End)
a(n) = (1 + (-1)^(n*(n-1)/2))/2. - Guenther Schrack, Apr 04 2019

Extensions

Definition rewritten by N. J. A. Sloane, Apr 30 2009

A011848 a(n) = floor(binomial(n, 2)/2).

Original entry on oeis.org

0, 0, 0, 1, 3, 5, 7, 10, 14, 18, 22, 27, 33, 39, 45, 52, 60, 68, 76, 85, 95, 105, 115, 126, 138, 150, 162, 175, 189, 203, 217, 232, 248, 264, 280, 297, 315, 333, 351, 370, 390, 410, 430, 451, 473, 495, 517, 540, 564, 588, 612, 637, 663, 689, 715, 742, 770, 798
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1996

Keywords

Comments

Column sums of an array of the odd numbers repeatedly shifted 4 places to the right:
1 3 5 7 9 11 13 15 17...
1 3 5 7 9...
1...
.........................
-------------------------
1 3 5 7 10 14 18 22 27...
Floor of the area under the polygon connecting the lattice points (n, floor(n/2)) from 0..n. - Wesley Ivan Hurt, Jun 09 2014
Beginning with a(4)=3, the sequence might be called the "off-axis" Ulam-Spiral numbers because they are the numbers in ascending order on the horizontal and vertical spokes (heading outward) starting with the first turning points on the spiral (i.e., 3, 5, 7 and 10). That is, starting with: 3 (upward); 5 (leftward); 7 (downward) and 10 (rightward). These are A033991 (starting at a(1)), A007742 (starting at a(1)), A033954 (starting at a(1)) and A001107 (starting at a(2)), respectively. These quadri-sections are summarized in the formulas of Sep 26 2015. - Bob Selcoe, Oct 05 2015
Conjecture: For n = 2, a(n) is the greatest k such that A123663(k) < A000217(n - 2). - Peter Kagey, Nov 18 2016
a(n) is also the matching number of the n-triangular graph, (n-1)-triangular honeycomb queen graph, (n-1)-triangular honeycomb bishop graphs, and (for n > 7) (n-1)-triangular honeycomb obtuse knight graphs. - Eric W. Weisstein, Jun 02 2017 and Apr 03 2018
After 0, 0, 0, add 1, then add 2 three times, then add 3, then add 4 three times, then add 5, etc.; i.e., first differences are A004524 = (0, 0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, ...). - M. F. Hasler, May 09 2018
Let s(0) = s(1) = 1, s(-1) = s(2) = x, and s(n+2)*s(n-2) = s(n+1)*s(n-1) + s(n)^2 for all n in Z. Then s(n) = p(n) / x^e(n) is a Laurent polynomial in x with p(n) a polynomial with nonnegative integer coefficients of degree a(n) for all n in Z. If x = 1, then s(n) = p(n) = A006720(n+1). - Michael Somos, Mar 22 2023

Examples

			G.f. = x^3 + 3*x^4 + 5*x^5 + 7*x^6 + 10*x^7 + 14*x^8 + 18*x^9 + 22*x^10 + ...
p(0) = p(1) = 1, p(2) = 1 + x, p(3) = 1 + x + x^3, p(4) = 1 + 2*x + 2*x^2 + x^3 + x^5. - _Michael Somos_, Mar 22 2023
		

Crossrefs

A column of triangle A011857.
First differences are in A004524.
Cf. A007318, A033991, A007742, A033954, A001107, A006720, A035608 (bisection), A156859 (bisection).

Programs

  • GAP
    List([0..60],n->Int(Binomial(n,2)/2)); # Muniru A Asiru, Apr 05 2018
    
  • Haskell
    a011848 n = if n < 2 then 0 else flip div 2 $ a007318 n 2
    -- Reinhard Zumkeller, Mar 04 2015
    
  • Magma
    [ Floor(n*(n-1)/4) : n in [0..50] ]; // Wesley Ivan Hurt, Jun 09 2014
    
  • Maple
    seq(floor(binomial(n,2)/2), n=0..57); # Zerinvary Lajos, Jan 12 2009
  • Mathematica
    Table[Floor[n (n - 1)/4], {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, Jun 28 2011 *)
    CoefficientList[Series[x^3/((1 + x^2) (1 - x)^3), {x, 0, 70}], x] (* Vincenzo Librandi, Jun 21 2013 *)
    LinearRecurrence[{3, -4, 4, -4, 1}, {0, 0, 1, 3, 5}, {0, 20}] (* Eric W. Weisstein, Jun 02 2017 *)
    Table[Floor[Binomial[n, 2]/2], {n, 0, 20}] (* Eric W. Weisstein, Jun 02 2017 *)
    Table[1/4 (-1 + (-1 + n) n + Cos[n Pi/2] + Sin[n Pi/2]), {n, 0, 20}] (* Eric W. Weisstein, Jun 02 2017 *)
    Floor[Binomial[Range[0, 20], 2]/2] (* Eric W. Weisstein, Apr 03 2018 *)
  • PARI
    a(n) = binomial(n, 2)\2;
    
  • PARI
    vector(100, n, n--; floor(n*(n-1)/4)) \\ Altug Alkan, Sep 30 2015
    
  • Python
    def a(n): return n*(n-1)//4 # Christoph B. Kassir, Oct 07 2022
  • Sage
    [floor(binomial(n,2)/2) for n in range(0,58)] # Zerinvary Lajos, Dec 01 2009
    

Formula

G.f.: x^3*(1-x^2)/((1-x)^3*(1-x^4)).
G.f.: x^3/((1+x^2)*(1-x)^3). - Jon Perry, Mar 31 2004
a(n) = +3*a(n-1) -4*a(n-2) +4*a(n-3) -3*a(n-4) +a(n-5). - R. J. Mathar, Apr 15 2010
a(n) = floor((n/(1+e^(1/n)))^2). - Richard R. Forberg, Jun 19 2013
a(n) = floor(n*(n-1)/4). - T. D. Noe, Jun 20 2013
a(n) = (1/4) * ( n^2 - n - 1 + (-1)^floor(n/2) ). - Ralf Stephan, Aug 11 2013
a(n) = A054925(n) - A133872(n+2). - Wesley Ivan Hurt, Jun 09 2014
a(4*n) = A033991(n). a(4*n+1) = A007742(n). a(4*n+2) = A033954(n). a(4*n+3) = A001107(n+1). - Bob Selcoe, Sep 26 2015
E.g.f.: (sin(x) + cos(x) + (x^2 - 1)*exp(x))/4. - Ilya Gutkovskiy, Nov 18 2016
A054925(n) = a(-n). A035608(n) = a(2*n+1). Wesley Ivan Hurt, Jun 09 2014
A156859(n) = a(2*n+2). - Michael Somos, Nov 18 2016
Euler transform of length 4 sequence [ 3, -1, 0, 1]. - Michael Somos, Nov 18 2016
From Amiram Eldar, Mar 18 2022: (Start)
Sum_{n>=3} 1/a(n) = 40/9 - 2*Pi/3.
Sum_{n>=3} (-1)^(n+1)/a(n) = 32/9 - 4*log(2). (End)
0 = a(n+2)*(a(n)*(a(n) -6*a(n+1) +4*a(n+2)) +a(n+1)*(8*a(n+1) -10*a(n+2)) + 3*a(n+2)^2) +a(n+3)*(a(n)*(+a(n) -2*a(n+1)) +a(n+2)*(2*a(n+1) -a(n+2))) for all n in Z. - Michael Somos, Mar 22 2023
2*a(n) + 2*a(n-2) = (n-1)*(n-2). - R. J. Mathar, Feb 12 2024

A054924 Triangle read by rows: T(n,k) = number of nonisomorphic unlabeled connected graphs with n nodes and k edges (n >= 1, 0 <= k <= n(n-1)/2).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 3, 5, 5, 4, 2, 1, 1, 0, 0, 0, 0, 0, 6, 13, 19, 22, 20, 14, 9, 5, 2, 1, 1, 0, 0, 0, 0, 0, 0, 11, 33, 67, 107, 132, 138, 126, 95, 64, 40, 21, 10, 5, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 23, 89, 236, 486, 814, 1169, 1454, 1579, 1515, 1290, 970, 658, 400, 220, 114
Offset: 1

Views

Author

Keywords

Examples

			Triangle begins:
1;
0,1;
0,0,1,1;
0,0,0,2,2,1,1;
0,0,0,0,3,5,5,4,2,1,1;
0,0,0,0,0,6,13,19,22,20,14,9,5,2,1,1;
the last batch giving the numbers of connected graphs with 6 nodes and from 0 to 15 edges.
		

References

  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.

Crossrefs

Other versions of this triangle: A046751, A076263, A054923, A046742.
Row sums give A001349, column sums give A002905. A046751 is essentially the same triangle. A054923 and A046742 give same triangle but read by columns.
Main diagonal is A000055. Next diagonal is A001429. Largest entry in each row gives A001437.

Programs

  • Mathematica
    A076263 gives a Mathematica program which produces the nonzero entries in each row.
    Needs["Combinatorica`"]; Table[Print[row = Join[Array[0&, n-1], Table[ Count[ Combinatorica`ListGraphs[n, k], g_ /; Combinatorica`ConnectedQ[g]], {k, n-1, n*(n-1)/2}]]]; row, {n, 1, 8}] // Flatten (* Jean-François Alcover, Jan 15 2015 *)

A350394 Largest degree of x with the largest coefficient in Product_{k=1..n} (1 + x^k).

Original entry on oeis.org

0, 1, 3, 3, 7, 10, 12, 16, 18, 24, 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, 827, 856, 885, 915, 946, 977
Offset: 0

Views

Author

Max Alekseyev, Dec 28 2021

Keywords

Comments

Apparently, a(n) = A054925(n+1) for n >= 10. - Hugo Pfoertner, Dec 30 2021

Crossrefs

Cf. A025591 (largest coefficient), A350393 (smallest degree of x), A350395, A350396.
Cf. A054925.

Programs

  • PARI
    { A350394(n) = my(v,t,x='x); v = Vec(prod(k=1,n,1+x^k)); vecmax(v,&t); #v-t; }

A213484 Number of (w,x,y) with all terms in {0,...,n} and |w-x| + |x-y| + |y-w| >= w+x+y.

Original entry on oeis.org

1, 4, 7, 10, 16, 25, 34, 43, 55, 70, 85, 100, 118, 139, 160, 181, 205, 232, 259, 286, 316, 349, 382, 415, 451, 490, 529, 568, 610, 655, 700, 745, 793, 844, 895, 946, 1000, 1057, 1114, 1171, 1231, 1294, 1357, 1420, 1486, 1555, 1624, 1693, 1765
Offset: 0

Views

Author

Clark Kimberling, Jun 13 2012

Keywords

Comments

a(n) + A213485(n) = (n+1)^3.
For a guide to related sequences, see A212959.

Crossrefs

Cf. A212959.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[w + x + y == Abs[w - x] + Abs[x - y] + Abs[y - w],
    s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    Map[t[#] &, Range[0, 60]]   (* A213484 *)

Formula

a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5).
G.f.: (1 + x - x^2 + x^3 + x^4)/((1 - x)^3 (1 + x^2)).
From Ayoub Saber Rguez, Dec 31 2021: (Start)
a(n) + A213485(n) = (n+1)^3.
a(n) = 3*A054925(n+1) + 1.
a(n) = 3*(A192447(n+1)/2) + 1.
a(n) = (3*n^2 + 3*n + 4 + 3*((n+1) mod 4 - (n+1) mod 2))/4. (End)

A213172 Floor of the Euclidean distance of a point on the (1, 2, 3; 4, 5, 6) 3D walk.

Original entry on oeis.org

0, 1, 2, 3, 6, 9, 12, 16, 21, 26, 32, 38, 45, 52, 61, 69, 78, 88, 99, 110, 121, 133, 146, 159, 173, 188, 203, 218, 234, 251, 268, 286, 305, 324, 343, 364, 384, 406, 428, 450, 473, 497, 521, 546, 571, 597, 624, 651, 679, 707, 736, 765, 795, 826, 857
Offset: 0

Views

Author

Jon Perry, Apr 14 2013

Keywords

Comments

Consider a standard 3-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 x-axis, and so on. This sequence gives the floor of the Euclidean distance to the origin after n steps.
The (x,y,z) coordinates are (1,0,0), (1,2,0), (1,2,3), (5,2,3), (5,7,3), (5,7,9), (12,7,9) etc, where the x values run through A000326, the y-values through A005449, and the z-values through A045943. The squared Euclidean distances are s(n) = 1, 5, 14, 38, 83, 155, 274, 450,..., which obey the recurrence s(n) = 3*s(n-1) -3*s(n-2) +3*s(n-3) -6*s(n-4) +6*s(n-5) -3*s(n-6) +3*s(n-7) -3*s(n-8) +s(n-9), s(n) = (3*n^2+9*n+10)^2/108 +4*A099837(n+3)/27 -2*(-1)^n*A165202(n)/9, with a = floor(sqrt(s(n))). - R. J. Mathar, May 02 2013

Examples

			For a(4) we are at [5,2,3], so a(n) = floor(sqrt(25+4+9)) = 6.
		

Crossrefs

Programs

  • JavaScript
    p=new Array(0,0,0);
    for (a=0;a<100;a++) {
    p[a%3]+=a;
    document.write(Math.floor(Math.sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]))+", ");
    }

Formula

a(n) ~ n^2 sqrt(3)/6. - Charles R Greathouse IV, May 02 2013

A192447 a(n) = n*(n-1)/2 if this is even, otherwise (n*(n-1)/2) + 1.

Original entry on oeis.org

0, 2, 4, 6, 10, 16, 22, 28, 36, 46, 56, 66, 78, 92, 106, 120, 136, 154, 172, 190, 210, 232, 254, 276, 300, 326, 352, 378, 406, 436, 466, 496, 528, 562, 596, 630, 666, 704, 742, 780, 820, 862, 904, 946, 990, 1036, 1082, 1128, 1176, 1226, 1276, 1326, 1378, 1432
Offset: 1

Views

Author

Ivaylo Kortezov, Jul 01 2011

Keywords

Comments

Least number of swaps of passports of n persons so that each two have swapped at least once and finally each one gets his own passport (JBMO 2011 Shortlist).

Examples

			a(3) = 4: Let the initial state be Aa, Bb, Cc. Swap(AB) to get Ab, Ba, Cc. Swap(AC) to get Ac, Ba, Cb. Swap(BC) to get Ac, Bb, Ca. Swap(AC) to get Aa, Bb, Cc, done.
		

Crossrefs

Equals the corresponding term of A000217 if it is even or is 1 more otherwise.

Programs

  • Mathematica
    Table[(n^2 - n + 1 - (-1)^(n (n - 1)/2))/2, {n, 1, 60}] (* Bruno Berselli, Jun 07 2019 *)
    LinearRecurrence[{3,-4,4,-3,1}, {0,2,4,6,10}, 54] (* Georg Fischer, Oct 26 2020 *)
  • PARI
    a(n) = my(m=n*(n-1)/2); if (m % 2, m+1, m); \\ Michel Marcus, Jun 07 2019

Formula

a(n) = n*(n-1)/2 if this is even and a(n) = (n*(n-1)/2) + 1 otherwise.
a(n) = 2*A054925(n).
G.f.: 2*x*(x^2 - x + 1)/((1 - x)^3*(1 + x^2)).
a(n) = (n^2 - n + 1 - (-1)^(n*(n-1)/2))/2. - Guenther Schrack, Jun 04 2019
Sum_{n>=2} 1/a(n) = 2 - Pi/2 + Pi*sinh(sqrt(7)*Pi/4)/(sqrt(7)*(1/sqrt(2) + cosh(sqrt(7)*Pi/4))). - Amiram Eldar, Dec 14 2024
a(n) = 2*(A213484(n+1) - 1)/3 = (A373584(n) - 1)/3. - Hugo Pfoertner, Dec 15 2024

A238604 a(n) = Sum_{k=0..3} f(n+k)^2 where f=A130519.

Original entry on oeis.org

0, 1, 5, 14, 30, 65, 125, 216, 344, 533, 793, 1134, 1566, 2125, 2825, 3680, 4704, 5945, 7421, 9150, 11150, 13481, 16165, 19224, 22680, 26605, 31025, 35966, 41454, 47573, 54353, 61824, 70016, 79025, 88885, 99630, 111294, 123985, 137741, 152600, 168600, 185861
Offset: 0

Views

Author

Michael Somos, Mar 01 2014

Keywords

Examples

			G.f. = x + 5*x^2 + 14*x^3 + 30*x^4 + 65*x^5 + 125*x^6 + 216*x^7 + ...
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1 +2*x+2*x^2+2*x^3+10*x^4+2*x^5+2*x^6+2*x^7+ x^8)/((1-x)^3*(1-x^4)^2))); // G. C. Greubel, Aug 07 2018
  • Mathematica
    CoefficientList[Series[x*(1+2*x+2*x^2+2*x^3+10*x^4+2*x^5+2*x^6+2*x^7+ x^8)/((1-x)^3*(1-x^4)^2), {x, 0, 50}], x] (* G. C. Greubel, Aug 07 2018 *)
  • PARI
    {a(n) = if( n<0, n = -1-n); polcoeff( x * (1 + 2*x + 2*x^2 + 2*x^3 + 10*x^4 + 2*x^5 + 2*x^6 + 2*x^7 + x^8) / ( (1 - x)^3 * (1 - x^4)^2 ) + x * O(x^n), n)};
    

Formula

G.f.: x * (1 + 2*x + 2*x^2 + 2*x^3 + 10*x^4 + 2*x^5 + 2*x^6 + 2*x^7 + x^8) / ( (1 - x)^3 * (1 - x^4)^2 ).
a(n) = a(-1 - n) for all n in Z. floor( sqrt( a(n))) = A054925(n+1).

A373584 a(n) is equal to the number of shaded cells in a regular hexagon with side n drawn on a hexagonal grid.

Original entry on oeis.org

1, 7, 13, 19, 31, 49, 67, 85, 109, 139, 169, 199, 235, 277, 319, 361, 409, 463, 517, 571, 631, 697, 763, 829, 901, 979, 1057, 1135, 1219, 1309, 1399, 1489, 1585, 1687, 1789, 1891, 1999, 2113, 2227, 2341, 2461, 2587, 2713, 2839, 2971, 3109, 3247, 3385, 3529
Offset: 1

Views

Author

Nicolay Avilov, Jun 10 2024

Keywords

Comments

On a hexagonal grid, cells are colored as follows: one cell and all those located along three straight lines passing through the center of the original cell and forming six 60° angles between each other are painted. In each of these corners, cells are painted over so that a V-shaped arrangement of cells repeats ad infinitum. The number of shaded cells in regular hexagons centered on the starting cell determines the sequence a(n).

Examples

			a(3) = 19 - 6*1 = 13;
a(4) = 37 - 6*3 = 19.
                                                   o . o . o
                                 o . . o          . o . . o .
                   o . o        . o . o .        o . o . o . o
         o o      . o o .      . . o o . .      . . . o o . . .
   o    o o o    o o o o o    o o o o o o o    o o o o o o o o o
         o o      . o o .      . . o o . .      . . . o o . . .
                   o . o        . o . o .        o . o . o . o
                                 o . . o          . o . . o .
                                                   o . o . o
   1      7         13             19                 31
		

Crossrefs

Programs

  • Mathematica
    Table[6*Ceiling[n*(n - 1)/4] + 1, {n, 100}] (* Paolo Xausa, Jul 01 2024 *)

Formula

a(n+4) = a(n) + 12*n + 18.
a(n) = 6*ceiling(n*(n - 1)/4) + 1.
a(n) = A003215(n) - 6*A011848(n+1).
a(n) = 6*A054925(n) + 1.
G.f.: (1 + 4*x - 4*x^2 + 4*x^3 + x^4)/((1 - x)^3*(1 + x^2)). - Stefano Spezia, Jun 11 2024
E.g.f.: (exp(x)*(5 + 6*x + 3*x^2) - 3*cos(x) + 3*sin(x))/2. - Stefano Spezia, Aug 31 2025

A039825 a(n) = floor((n^2 + n + 8) / 4).

Original entry on oeis.org

2, 3, 5, 7, 9, 12, 16, 20, 24, 29, 35, 41, 47, 54, 62, 70, 78, 87, 97, 107, 117, 128, 140, 152, 164, 177, 191, 205, 219, 234, 250, 266, 282, 299, 317, 335, 353, 372, 392, 412, 432, 453, 475, 497, 519, 542, 566, 590, 614, 639
Offset: 1

Views

Author

Keywords

Comments

Number of different coefficient values in expansion of Product_{i=1..n} (1 + q^2 + q^4 + ... + q^(2i)).
The given terms have a second difference that is periodic with the period 1, 0, 0, 1, ... of length 4, an implicit recurrence. - John W. Layman, Jan 23 2001
Conjecturally, apart from the first term, the sequence terms are the exponents in the expansion of Sum_{n >= 1} q^(3*n) * (Product_{k >= 2*n} 1 - q^k) = q^3 - q^5 - q^7 + q^9 + q^12 - q^16 - q^20 + + - - .... Cf. A054925. - Peter Bala, Apr 13 2025

Crossrefs

Programs

  • Magma
    [Floor((n^2+n+8)/4): n in [1..50]]; // Bruno Berselli, Jul 25 2012

Formula

O.g.f.: -x*(2*x^4 - 4*x^3 + 4*x^2 - 3*x + 2)/((x-1)^3*(x^2+1)). - R. J. Mathar, Dec 05 2007
a(n) = A039823(n) + 1. - Bruno Berselli, Jul 25 2012
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5). - Wesley Ivan Hurt, May 08 2022
Showing 1-10 of 12 results. Next