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 33 results. Next

A378413 Irregular triangle read by rows: T(n,k) is the coefficient of x^k in the domination polynomial of the n-prism graph (n>=1, A004524(n+2)<=k<=2*n).

Original entry on oeis.org

2, 1, 6, 4, 1, 9, 20, 15, 6, 1, 4, 24, 62, 56, 28, 8, 1, 10, 85, 192, 200, 120, 45, 10, 1, 51, 288, 618, 696, 483, 220, 66, 12, 1, 14, 210, 966, 2018, 2408, 1862, 987, 364, 91, 14, 1, 4, 80, 824, 3248, 6646, 8304, 6992, 4176, 1804, 560, 120, 16, 1, 18, 405
Offset: 1

Views

Author

Eric W. Weisstein, Nov 25 2024

Keywords

Comments

Sequence extended to n=1 using the recurrence.
Sum_{k=A004524(n+2)..2*n} T(n,k) = A284702(n).
T(n,2*n) = 1.

Examples

			D(1) = 2*x+x^2
D(2) = 6*x^2+4*x^3+x^4
D(3) = 9*x^2+20*x^3+15*x^4+6*x^5+x^6
D(4) = 4*x^2+24*x^3+62*x^4+56*x^5+28*x^6+8*x^7+x^8
D(5) = 10*x^3+85*x^4+192*x^5+200*x^6+120*x^7+45*x^8+10*x^9+x^10
		

Crossrefs

Cf. A004524 (domination number of the (n-2)-prism graph).
Cf. A284702 (number of dominating sets in the n-prism graph).
Cf. A005843 (vertex count of the n-prism graph = 2*n).

Programs

  • Mathematica
    DeleteCases[#, 0] & /@ CoefficientList[LinearRecurrence[{2 x + x^2, x^2, 3 x^2 + 2 x^3, x^2, x^4, -x^4, -x^4}, {2 x + x^2, 6 x^2 + 4 x^3 + x^4, 9 x^2 + 20 x^3 + 15 x^4 + 6 x^5 + x^6, 4 x^2 + 24 x^3 + 62 x^4 + 56 x^5 + 28 x^6 + 8 x^7 + x^8, 10 x^3 + 85 x^4 + 192 x^5 + 200 x^6 + 120 x^7 + 45 x^8 + 10 x^9 + x^10, 51 x^4 + 288 x^5 + 618 x^6 + 696 x^7 + 483 x^8 + 220 x^9 + 66 x^10 + 12 x^11 + x^12, 14 x^4 + 210 x^5 + 966 x^6 + 2018 x^7 + 2408 x^8 + 1862 x^9 + 987 x^10 + 364 x^11 + 91 x^12 + 14 x^13 + x^14}, 10], x] // Flatten

Formula

D(n) = (2*x+x^2)*D(n-1) + x^2*D(n-2) + (3*x^2+2x^3)*D(n-3) + x^2*D(n-4) + x^4*D(n-5) - x^4*D(n-6) -x^4*D(n-7), where D(n) = sum(T(n,k)*x^k,k).

A132402 Binomial transform of A004524 starting at 1.

Original entry on oeis.org

1, 3, 7, 15, 32, 70, 156, 348, 768, 1672, 3600, 7696, 16384, 34784, 73664, 155584, 327680, 688256, 1442048, 3014912, 6291456, 13106688, 27261952, 56622080, 117440512, 243271680, 503320576, 1040191488, 2147483648
Offset: 0

Views

Author

Paul Curtz, Nov 12 2007

Keywords

Comments

Twisted numbers. b(n)=a(n)-2^n=0, 1, 3, 7, 16, 38, 92, 220, 512, 1160, 2576, twisted numbers. b(n+1)-2b(n)=1, 1, 1, 2, 6, 16, 36, 72, 136, 256.

Programs

  • Mathematica
    LinearRecurrence[{6,-14,16,-8},{1,3,7,15},30] (* Harvey P. Dale, Mar 30 2022 *)

Formula

a(n+1)-2a(n) = 1, 1, 1, 2, 6, 16, 36, 72, 136, 256 = essentially A038503.
O.g.f.: (1-x)^3/[(1-2x+2x^2)(-1+2x)^2]. a(n)=6*a(n-1)-14*a(n-2)+16*a(n-3)-8*a(n-4). - R. J. Mathar, Apr 02 2008
4*a(n) = (n+4)*2^n+2*A009545(n). - R. J. Mathar, Nov 01 2021

Extensions

More terms from R. J. Mathar, Apr 02 2008

A001840 Expansion of g.f. x/((1 - x)^2*(1 - x^3)).

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 26, 30, 35, 40, 45, 51, 57, 63, 70, 77, 84, 92, 100, 108, 117, 126, 135, 145, 155, 165, 176, 187, 198, 210, 222, 234, 247, 260, 273, 287, 301, 315, 330, 345, 360, 376, 392, 408, 425, 442, 459, 477, 495, 513, 532, 551, 570, 590
Offset: 0

Views

Author

Keywords

Comments

a(n-3) is the number of aperiodic necklaces (Lyndon words) with 3 black beads and n-3 white beads.
Number of triangular partitions (see Almkvist).
Consists of arithmetic progression quadruples of common difference n+1 starting at A045943(n). Refers to the least number of coins needed to be rearranged in order to invert the pattern of a (n+1)-rowed triangular array. For instance, a 5-rowed triangular array requires a minimum of a(4)=5 rearrangements (shown bracketed here) for it to be turned upside down.
.....{*}..................{*}*.*{*}{*}
.....*.*....................*.*.*.{*}
....*.*.*....---------\......*.*.*
..{*}*.*.*...---------/.......*.*
{*}{*}*.*{*}..................{*}
- Lekraj Beedassy, Oct 13 2003
Partial sums of 1,1,1,2,2,2,3,3,3,4,4,4,... - Jon Perry, Mar 01 2004
Sum of three successive terms is a triangular number in natural order starting with 3: a(n)+a(n+1)+a(n+2) = T(n+2) = (n+2)*(n+3)/2. - Amarnath Murthy, Apr 25 2004
Apply Riordan array (1/(1-x^3),x) to n. - Paul Barry, Apr 16 2005
Absolute values of numbers that appear in A145919. - Matthew Vandermast, Oct 28 2008
In the Moree definition, (-1)^n*a(n) is the 3rd Witt transform of A033999 and (-1)^n*A004524(n) with 2 leading zeros dropped is the 2nd Witt transform of A033999. - R. J. Mathar, Nov 08 2008
Column sums of:
1 2 3 4 5 6 7 8 9.....
1 2 3 4 5 6.....
1 2 3.....
........................
----------------------
1 2 3 5 7 9 12 15 18 - Jon Perry, Nov 16 2010
a(n) is the sum of the positive integers <= n that have the same residue modulo 3 as n. They are the additive counterpart of the triple factorial numbers. - Peter Luschny, Jul 06 2011
a(n+1) is the number of 3-tuples (w,x,y) with all terms in {0,...,n} and w=3*x+y. - Clark Kimberling, Jun 04 2012
a(n+1) is the number of pairs (x,y) with x and y in {0,...,n}, x-y = (1 mod 3), and x+y < n. - Clark Kimberling, Jul 02 2012
a(n+1) is the number of partitions of n into two sorts of part(s) 1 and one sort of (part) 3. - Joerg Arndt, Jun 10 2013
Arrange A004523 in rows successively shifted to the right two spaces and sum the columns:
1 2 2 3 4 4 5 6 6...
1 2 2 3 4 4 5...
1 2 2 3 4...
1 2 2...
1...
------------------------------
1 2 3 5 7 9 12 15 18... - L. Edson Jeffery, Jul 30 2014
a(n) = A258708(n+1,1) for n > 0. - Reinhard Zumkeller, Jun 23 2015
Also the number of triples of positive integers summing to n + 4, the first less than each of the other two. Also the number of triples of positive integers summing to n + 2, the first less than or equal to each of the other two. - Gus Wiseman, Oct 11 2020
Also the lower matching number of the (n+1)-triangular honeycomb king graph = n-triangular grid graph (West convention). - Eric W. Weisstein, Dec 14 2024

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 5*x^4 + 7*x^5 + 9*x^6 + 12*x^7 + 15*x^8 + 18*x^9 + ...
1+2+3=6=t(3), 2+3+5=t(4), 5+7+9=t(5).
[n] a(n)
--------
[1] 1
[2] 2
[3] 3
[4] 1 + 4
[5] 2 + 5
[6] 3 + 6
[7] 1 + 4 + 7
[8] 2 + 5 + 8
[9] 3 + 6 + 9
a(7) = floor(2/3) +floor(3/3) +floor(4/3) +floor(5/3) +floor(6/3) +floor(7/3) +floor(8/3) +floor(9/3) = 12. - _Bruno Berselli_, Aug 29 2013
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 73, problem 25.
  • Ulrich Faigle, Review of Gerhard Post and G.J. Woeginger, Sports tournaments, home-away assignments and the break minimization problem, MR2224983(2007b:90134), 2007.
  • Hansraj Gupta, Partitions of j-partite numbers into twelve or a smaller number of parts. Collection of articles dedicated to Professor P. L. Bhatnagar on his sixtieth birthday. Math. Student 40 (1972), 401-441 (1974).
  • Richard K. Guy, A problem of Zarankiewicz, in P. Erdős and G. Katona, editors, Theory of Graphs (Proceedings of the Colloquium, Tihany, Hungary), Academic Press, NY, 1968, pp. 119-150, (p. 126, divided by 2).
  • 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

Ordered union of triangular matchstick numbers A045943 and generalized pentagonal numbers A001318.
Cf. A058937.
A column of triangle A011847.
Cf. A258708.
A001399 counts 3-part partitions, ranked by A014612.
A337483 counts either weakly increasing or weakly decreasing triples.
A337484 counts neither strictly increasing nor strictly decreasing triples.
A014311 ranks 3-part compositions, with strict case A337453.

Programs

  • Haskell
    a001840 n = a001840_list !! n
    a001840_list = scanl (+) 0 a008620_list
    -- Reinhard Zumkeller, Apr 16 2012
  • Magma
    [ n le 2 select n else n*(n+1)/2-Self(n-1)-Self(n-2): n in [1..58] ];  // Klaus Brockhaus, Oct 01 2009
    
  • Maple
    A001840 := n->floor((n+1)*(n+2)/6);
    A001840:=-1/((z**2+z+1)*(z-1)**3); # conjectured (correctly) by Simon Plouffe in his 1992 dissertation
    seq(floor(binomial(n-1,2)/3), n=3..61); # Zerinvary Lajos, Jan 12 2009
    A001840 :=  n -> add(k, k = select(k -> k mod 3 = n mod 3, [$1 .. n])): seq(A001840(n), n = 0 .. 58); # Peter Luschny, Jul 06 2011
  • Mathematica
    a[0]=0; a[1]=1; a[n_]:= a[n]= n(n+1)/2 -a[n-1] -a[n-2]; Table[a[n], {n,0,100}]
    f[n_] := Floor[(n + 1)(n + 2)/6]; Array[f, 59, 0] (* Or *)
    CoefficientList[ Series[ x/((1 + x + x^2)*(1 - x)^3), {x, 0, 58}], x] (* Robert G. Wilson v *)
    a[ n_] := With[{m = If[ n < 0, -3 - n, n]}, SeriesCoefficient[ x /((1 - x^3) (1 - x)^2), {x, 0, m}]]; (* Michael Somos, Jul 11 2011 *)
    LinearRecurrence[{2,-1,1,-2,1},{0,1,2,3,5},60] (* Harvey P. Dale, Jul 25 2011 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n+4,{3}],#[[1]]<#[[2]]&&#[[1]]<#[[3]]&]],{n,0,15}] (* Gus Wiseman, Oct 05 2020 *)
  • PARI
    {a(n) = (n+1) * (n+2) \ 6}; /* Michael Somos, Feb 11 2004 */
    
  • Sage
    [binomial(n, 2) // 3 for n in range(2, 61)] # Zerinvary Lajos, Dec 01 2009
    

Formula

a(n) = (A000217(n+1) - A022003(n-1))/3;
a(n) = (A016754(n+1) - A010881(A016754(n+1)))/24;
a(n) = (A033996(n+1) - A010881(A033996(n+1)))/24.
Euler transform of length 3 sequence [2, 0, 1].
a(3*k-1) = k*(3*k + 1)/2;
a(3*k) = 3*k*(k + 1)/2;
a(3*k+1) = (k + 1)*(3*k + 2)/2.
a(n) = floor( (n+1)*(n+2)/6 ) = floor( A000217(n+1)/3 ).
a(n+1) = a(n) + A008620(n) = A002264(n+3). - Reinhard Zumkeller, Aug 01 2002
From Michael Somos, Feb 11 2004: (Start)
G.f.: x / ((1-x)^2 * (1-x^3)).
a(n) = 1 + a(n-1) + a(n-3) - a(n-4).
a(-3-n) = a(n). (End)
a(n) = a(n-3) + n for n > 2; a(0)=0, a(1)=1, a(2)=2. - Paul Barry, Jul 14 2004
a(n) = binomial(n+3, 3)/(n+3) + cos(2*Pi*(n-1)/3)/9 + sqrt(3)sin(2*Pi*(n-1)/3)/9 - 1/9. - Paul Barry, Jan 01 2005
From Paul Barry, Apr 16 2005: (Start)
a(n) = Sum_{k=0..n} k*(cos(2*Pi*(n-k)/3 + Pi/3)/3 + sqrt(3)*sin(2*Pi*(n-k)/3 + Pi/3)/3 + 1/3).
a(n) = Sum_{k=0..floor(n/3)} n-3*k. (End)
For n > 1, a(n) = A000217(n) - a(n-1) - a(n-2); a(0)=0, a(1)=1.
G.f.: x/(1 + x + x^2)/(1 - x)^3. - Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009
a(n) = (4 + 3*n^2 + 9*n)/18 + ((n mod 3) - ((n-1) mod 3))/9. - Klaus Brockhaus, Oct 01 2009
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5), with n>4, a(0)=0, a(1)=1, a(2)=2, a(3)=3, a(4)=5. - Harvey P. Dale, Jul 25 2011
a(n) = A214734(n + 2, 1, 3). - Renzo Benedetti, Aug 27 2012
G.f.: x*G(0), where G(k) = 1 + x*(3*k+4)/(3*k + 2 - 3*x*(k+2)*(3*k+2)/(3*(1+x)*k + 6*x + 4 - x*(3*k+4)*(3*k+5)/(x*(3*k+5) + 3*(k+1)/G(k+1)))); (continued fraction). - Sergei N. Gladkovskii, Jun 10 2013
Empirical: a(n) = floor((n+3)/(e^(6/(n+3))-1)). - Richard R. Forberg, Jul 24 2013
a(n) = Sum_{i=0..n} floor((i+2)/3). - Bruno Berselli, Aug 29 2013
0 = a(n)*(a(n+2) + a(n+3)) + a(n+1)*(-2*a(n+2) - a(n+3) + a(n+4)) + a(n+2)*(a(n+2) - 2*a(n+3) + a(n+4)) for all n in Z. - Michael Somos, Jan 22 2014
a(n) = n/2 + floor(n^2/3 + 2/3)/2. - Bruno Berselli, Jan 23 2017
a(n) + a(n+1) = A000212(n+2). - R. J. Mathar, Jan 14 2021
Sum_{n>=1} 1/a(n) = 20/3 - 2*Pi/sqrt(3). - Amiram Eldar, Sep 27 2022
E.g.f.: (exp(x)*(4 + 12*x + 3*x^2) - 4*exp(-x/2)*cos(sqrt(3)*x/2))/18. - Stefano Spezia, Apr 05 2023

A032528 Concentric hexagonal numbers: floor(3*n^2/2).

Original entry on oeis.org

0, 1, 6, 13, 24, 37, 54, 73, 96, 121, 150, 181, 216, 253, 294, 337, 384, 433, 486, 541, 600, 661, 726, 793, 864, 937, 1014, 1093, 1176, 1261, 1350, 1441, 1536, 1633, 1734, 1837, 1944, 2053, 2166, 2281, 2400, 2521, 2646, 2773, 2904, 3037, 3174, 3313, 3456, 3601, 3750
Offset: 0

Views

Author

Keywords

Comments

From Omar E. Pol, Aug 20 2011: (Start)
Cellular automaton on the hexagonal net. The sequence gives the number of "ON" cells in the structure after n-th stage. A007310 gives the first differences. For a definition without words see the illustration of initial terms in the example section. Note that the cells become intermittent. A083577 gives the primes of this sequences.
A033581 and A003154 interleaved.
Row sums of an infinite square array T(n,k) in which column k lists 2*k-1 zeros followed by the numbers A008458 (see example). (End)
Sequence found by reading the line from 0, in the direction 0, 1, ... and the same line from 0, in the direction 0, 6, ..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. Main axis perpendicular to A045943 in the same spiral. - Omar E. Pol, Sep 08 2011

Examples

			From _Omar E. Pol_, Aug 20 2011: (Start)
Using the numbers A008458 we can write:
  0, 1, 6, 12, 18, 24, 30, 36, 42,  48,  54, ...
  0, 0, 0,  1,  6, 12, 18, 24, 30,  36,  42, ...
  0, 0, 0,  0,  0,  1,  6, 12, 18,  24,  30, ...
  0, 0, 0,  0,  0,  0,  0,  1,  6,  12,  18, ...
  0, 0, 0,  0,  0,  0,  0,  0,  0,   1,   6, ...
And so on.
===========================================
The sums of the columns give this sequence:
0, 1, 6, 13, 24, 37, 54, 73, 96, 121, 150, ...
...
Illustration of initial terms as concentric hexagons:
.
.                                         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 o o o        o         o
.                                         o o o o o
.
. 1    6        13           24               37
.
(End)
		

Crossrefs

Programs

Formula

From Joerg Arndt, Aug 22 2011: (Start)
G.f.: (x+4*x^2+x^3)/(1-2*x+2*x^3-x^4) = x*(1+4*x+x^2)/((1+x)*(1-x)^3).
a(n) = +2*a(n-1) -2*a(n-3) +1*a(n-4). (End)
a(n) = (6*n^2+(-1)^n-1)/4. - Bruno Berselli, Aug 22 2011
a(n) = A184533(n), n >= 2. - Clark Kimberling, Apr 20 2012
First differences of A011934: a(n) = A011934(n) - A011934(n-1) for n>0. - Franz Vrabec, Feb 17 2013
From Paul Curtz, Mar 31 2019: (Start)
a(-n) = a(n).
a(n) = a(n-2) + 6*(n-1) for n > 1.
a(2*n) = A033581(n).
a(2*n+1) = A003154(n+1). (End)
E.g.f.: (3*x*(x + 1)*cosh(x) + (3*x^2 + 3*x - 1)*sinh(x))/2. - Stefano Spezia, Aug 19 2022
Sum_{n>=1} 1/a(n) = Pi^2/36 + tan(Pi/(2*sqrt(3)))*Pi/(2*sqrt(3)). - Amiram Eldar, Jan 16 2023

Extensions

New name and more terms a(41)-a(50) from Omar E. Pol, Aug 20 2011

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

A004525 One even followed by three odd.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 9, 10, 11, 11, 11, 12, 13, 13, 13, 14, 15, 15, 15, 16, 17, 17, 17, 18, 19, 19, 19, 20, 21, 21, 21, 22, 23, 23, 23, 24, 25, 25, 25, 26, 27, 27, 27, 28, 29, 29, 29, 30, 31, 31, 31, 32, 33, 33, 33, 34, 35, 35, 35, 36, 37, 37, 37
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the composition length of the n-th symmetric power of the natural representation of a finite subgroup of SL(2,C) of type E_6 (binary tetrahedral group). - Paul Boddington, Oct 23 2003
(1 + x + x^2 + x^3 + x^4 + x^5) / ( (1-x^3)*(1- x^4)) is the Poincaré series [or Poincare series] (or Molien series) for H^*(GL_2(F_3)). - N. J. A. Sloane, Jun 12 2004
The Fi1 and Fi2 sums, see A180662 for the definition of these sums, of triangle A101950 equal the terms of this sequence without the first term. - Johannes W. Meijer, Aug 06 2011
Also the domination number of the n X n black bishop graph. - Eric W. Weisstein, Jun 26 2017
Also the domination number of the (n-1)-Moebius laddder. - Eric W. Weisstein, Jun 30 2017
Also the rook domination number of the hexagonal hexagon board B_n [Harborth and Nienborg] - N. J. A. Sloane, Aug 31 2021
Two players play a game, the object of which is to determine a score. Player 1 prefers larger scores, while player 2 prefers smaller scores. The game begins with a set of potential scores {1,2,3, ... n}. Player 1 divides this set into two nonempty sets, one of which player 2 chooses. Player 2 the divides their chosen set into two nonempty sets, one of which player 1 chooses, and so on, until the final score is arrived at. a(n+1) is the final score when both players play optimally. - Thomas Anton, Jul 14 2023

Examples

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

References

  • A. Adem and R. J. Milgram, Cohomology of Finite Groups, Springer-Verlag, 2nd. ed., 2004; p. 247.
  • Y. Ito, I. Nakamura, Hilbert schemes and simple singularities, New trends in algebraic geometry (Warwick, 1996), 151-233, Cambridge University Press, 1999.

Crossrefs

Programs

  • Haskell
    a004525 n = a004525_list !! n
    a004525_list = 0 : 1 : 1 : zipWith3 (\x y z -> x - y + z + 1)
                   a004525_list (tail a004525_list) (drop 2 a004525_list)
    -- Reinhard Zumkeller, Jul 14 2012
    
  • Magma
    [Floor(n/4) + Ceiling(n/4): n in [0..70]]; // Vincenzo Librandi, Aug 07 2011
    
  • Maple
    A004525 := proc(n): floor(n/4) + ceil(n/4) end: seq(A004525(n), n=0..75); # Johannes W. Meijer, Aug 06 2011
  • Mathematica
    Table[Floor[n/4] + Ceiling[n/4], {n, 0, 100}] (* Wesley Ivan Hurt, Oct 22 2013 *)
    Table[(n + Sin[n Pi/2])/2, {n, 0, 30}] (* Eric W. Weisstein, Jun 30 2017 *)
    LinearRecurrence[{2, -2, 2, -1}, {1, 1, 1, 2}, {0, 20}] (* Eric W. Weisstein, Jun 30 2017 *)
    Table[{n - 1, n, n, n}, {n, 1, 41, 2}] // Flatten (* Harvey P. Dale, Oct 18 2019 *)
  • Maxima
    makelist((1/4)*(2*n-(1-(-1)^n)*(-1)^(n*(n+1)/2)), n, 0, 75); /* Bruno Berselli, Mar 13 2012 */
    
  • PARI
    {a(n) = n\4 + (n+3)\4}; /* Michael Somos, Jul 19 2003 */
    
  • Python
    def A004525(n): return ((n>>1)&-2)+bool(n&3) # Chai Wah Wu, Jan 27 2023

Formula

a(n) = a(n-1) - a(n-2) + a(n-3) + 1 = n - A004524(n+1). - Henry Bottomley, Mar 08 2000
G.f.: x*(1-x+x^2)/((1-x)^2*(1+x^2)) = x*(1-x^6)/((1-x)*(1-x^3)*(1-x^4)). - Michael Somos, Jul 19 2003
a(n) = -a(-n) for all n in Z. - Michael Somos, Jul 19 2003
a(n) = floor(n/4) + ceiling(n/4). See also A004396, one even followed by two odd and A002620, quarter-squares: floor(n/2)*ceiling(n/2). - Jonathan Vos Post, Mar 19 2006
a(n) = Sum_{k=0..n-1} (1 + (-1)^binomial(k+1, 2))/2. - Paul Barry, Mar 31 2008
E.g.f: A(x) = (x*exp(x) + sin(x))/2. - Vladimir Kruchinin, Feb 20 2011
a(n) = (1/4)*(2*n - (1 - (-1)^n)*(-1)^(n*(n+1)/2)). - Bruno Berselli, Mar 13 2012
a(n) = (n - floor(cos(Pi*(n+1)/2)))/2. - Wesley Ivan Hurt, Oct 22 2013
Euler transform of length 6 sequence [1, 0, 1, 1, 0, -1]. - Michael Somos, Apr 03 2017
a(n) = (n + sin(n*Pi/2))/2. - Wesley Ivan Hurt, Oct 02 2017
a(n) = n-1-a(n-2) for n >= 2. - Kritsada Moomuang, Oct 29 2019

A008621 Expansion of 1/((1-x)*(1-x^4)).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21
Offset: 0

Views

Author

Keywords

Comments

Arises from Gleason's theorem on self-dual codes: 1/((1-x^2)*(1-x^8)) is the Molien series for the real 2-dimensional Clifford group (a dihedral group of order 16) of genus 1.
Thickness of the hypercube graph Q_n. - Eric W. Weisstein, Sep 09 2008
Count of odd numbers between consecutive quarter-squares, A002620. Oppermann's conjecture states that for each count there will be at least one prime. - Fred Daniel Kline, Sep 10 2011
Number of partitions into parts 1 and 4. - Joerg Arndt, Jun 01 2013
a(n-1) is the minimum independence number over all planar graphs with n vertices. The bound follows from the Four Color Theorem. It is attained by a union of 4-cliques. Other extremal graphs are examined in the Bickle link. - Allan Bickle, Feb 04 2022

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.
  • F. J. MacWilliams and N. J. A. Sloane, Theory of Error-Correcting Codes, 1977, Chapter 19, Problem 3, p. 602.

Crossrefs

Cf. A002265 (equals this - 1).

Programs

Formula

a(n) = floor(n/4) + 1.
a(n) = A010766(n+4, 4).
Also, a(n) = ceiling((n+1)/4), n >= 0. - Mohammad K. Azarian, May 22 2007
a(n) = Sum_{i=0..n} A121262(i) = n/4 + 5/8 + (-1)^n/8 + A057077(n)/4. - R. J. Mathar, Mar 14 2011
a(x,y) := floor(x/2) + floor(y/2) - x where x = A002620(n) and y = A002620(n+1), n > 2. - Fred Daniel Kline, Sep 10 2011
a(n) = a(n-1) + a(n-4) - a(n-5); a(0)=1, a(1)=1, a(2)=1, a(3)=1, a(4)=2. - Harvey P. Dale, Feb 19 2012
From R. J. Mathar, Jun 04 2021: (Start)
G.f.: 1 / ( (1+x)*(1+x^2)*(x-1)^2 ).
a(n) + a(n-1) = A004524(n+3).
a(n) + a(n-2) = A008619(n). (End)
a(n) = A002265(n) + 1. - M. F. Hasler, Oct 17 2022

Extensions

More terms from Stefan Steinerberger, Apr 03 2006

A201629 a(n) = n if n is even and otherwise its nearest multiple of 4.

Original entry on oeis.org

0, 0, 2, 4, 4, 4, 6, 8, 8, 8, 10, 12, 12, 12, 14, 16, 16, 16, 18, 20, 20, 20, 22, 24, 24, 24, 26, 28, 28, 28, 30, 32, 32, 32, 34, 36, 36, 36, 38, 40, 40, 40, 42, 44, 44, 44, 46, 48, 48, 48, 50, 52, 52, 52, 54, 56, 56, 56, 58, 60, 60, 60, 62, 64, 64, 64, 66, 68, 68
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 03 2011

Keywords

Comments

For n > 1, the maximal number of nonattacking knights on a 2 x (n-1) chessboard.
Compare this with the binary triangle construction of A240828.
Minimal number of straight segments in a rook circuit of an (n-1) X n board (see example). - Ruediger Jehn, Feb 26 2021

Examples

			G.f. = 2*x^2 + 4*x^3 + 4*x^4 + 4*x^5 + 6*x^6 + 8*x^7 + 8*x^8 + 8*x^9 + ...
From _Ruediger Jehn_, Feb 26 2021: (Start)
a(5) = 4:
   +----+----+----+----+----+
   |  __|____|_   |   _|__  |
   | /  |    | \  |  / |  \ |
   +----+----+----+----+----+
   | \__|__  | |  |  | |  | |
   |    |  \ | \__|__/ |  | |
   +----+----+----+----+----+
   |  __|__/ |  __|__  |  | |
   | /  |    | /  |  \ |  | |
   +----+----+----+----+----+
   | \  |    | |  |  | |  | |
   |  \_|____|_/  |  \_|__/ |
   +----+----+----+----+----+
There are at least 4 squares on the 4 X 5 board with straight lines (here in squares a_12, a_25, a_35 and a_42).  (End)
		

Crossrefs

Programs

  • Haskell
    a201629 = (* 2) . a004524 . (+ 1) -- Reinhard Zumkeller, Aug 05 2014
    
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(2*x^2/((1-x)^2*(1+x^2)))); // G. C. Greubel, Aug 13 2018
  • Maple
    seq(n-sin(Pi*n/2), n=0..30); # Robert Israel, Jul 14 2015
  • Mathematica
    Table[2*(Floor[(Floor[(n + 1)/2] + 1)/2] + Floor[(Floor[n/2] + 1)/2]), {n, 1, 100}]
    Table[If[EvenQ[n], n, 4*Round[n/4]], {n, 0, 68}] (* Alonso del Arte, Jan 27 2012 *)
    CoefficientList[Series[2 x^2/((-1 + x)^2 (1 + x^2)), {x, 0, 100}], x] (* Vincenzo Librandi, Aug 06 2014 *)
    a[ n_] := n - KroneckerSymbol[ -4, n]; (* Michael Somos, Jul 18 2015 *)
  • PARI
    a(n)=n\4*4+[0, 0, 2, 4][n%4+1] \\ Charles R Greathouse IV, Jan 27 2012
    
  • PARI
    {a(n) = n - kronecker( -4, n)}; /* Michael Somos, Jul 18 2015 */
    

Formula

a(n) = n - sin(n*Pi/2).
G.f.: 2*x^2/((1-x)^2*(1+x^2)).
a(n) = 2*A004524(n+1). - R. J. Mathar, Feb 02 2012
a(n) = n+(1-(-1)^n)*(-1)^((n+1)/2)/2. - Bruno Berselli, Aug 06 2014
E.g.f.: x*exp(x) - sin(x). - G. C. Greubel, Aug 13 2018

Extensions

Formula corrected by Robert Israel, Jul 14 2015

A122196 Fractal sequence: count down by 2's from successive integers.

Original entry on oeis.org

1, 2, 3, 1, 4, 2, 5, 3, 1, 6, 4, 2, 7, 5, 3, 1, 8, 6, 4, 2, 9, 7, 5, 3, 1, 10, 8, 6, 4, 2, 11, 9, 7, 5, 3, 1, 12, 10, 8, 6, 4, 2, 13, 11, 9, 7, 5, 3, 1, 14, 12, 10, 8, 6, 4, 2, 15, 13, 11, 9, 7, 5, 3, 1, 16, 14, 12, 10, 8, 6, 4, 2, 17, 15, 13, 11, 9, 7, 5, 3, 1, 18, 16, 14, 12, 10, 8, 6, 4, 2, 19, 17
Offset: 1

Views

Author

Keywords

Comments

First differences of A076644. Fractal - deleting the first occurrence of each integer leaves the original sequence. Also, original sequence plus 1. 1's occur at square indices. New values occur at indices m^2+1 and m^2+m+1.
Ordinal transform of A122197.
Row sums give A002620. - Gary W. Adamson, Nov 29 2008
From Gary W. Adamson, Dec 05 2009: (Start)
A122196 considered as an infinite lower triangular matrix * [1,2,3,...] =
A006918 starting (1, 2, 5, 8, 14, 20, 30, 40, ...).
Let A122196 = an infinite lower triangular matrix M; then lim_{n->infinity} M^n = A171238, a left-shifted vector considered as a matrix. (End)
A122196 is the fractal sequence associated with the dispersion A082156; that is, A122196(n) is the number of the row of A082156 that contains n. - Clark Kimberling, Aug 12 2011
From Johannes W. Meijer, Sep 09 2013: (Start)
The alternating row sums lead to A004524(n+2).
The antidiagonal sums equal A001840(n). (End)

Examples

			The first few rows of the sequence a(n) as a triangle T(n, k):
n/k  1   2   3
1    1
2    2
3    3,  1
4    4,  2
5    5,  3,  1
6    6,  4,  2
		

Crossrefs

Programs

  • Haskell
    a122196 n = a122196_list !! (n-1)
    a122196_list = concatMap (\x -> enumFromThenTo x (x - 2) 1) [1..]
    -- Reinhard Zumkeller, Jul 19 2012
  • Maple
    From Johannes W. Meijer, Sep 09 2013: (Start)
    a := proc(n) local t: t:=floor((sqrt(4*n-3)-1)/2): floor(sqrt(4*n-1))-2*((n-1) mod (t+1)) end: seq(a(n), n=1..92); # End first program.
    T := (n, k) -> n-2*k+2: seq(seq(T(n, k), k=1..floor((n+1)/2)), n=1..18); # End second program. (End)
  • Mathematica
    Flatten@Range[Range[10], 1, -2] (* Birkas Gyorgy, Apr 07 2011 *)

Formula

From Boris Putievskiy, Sep 09 2013: (Start)
a(n) = 2*(1-A122197(n)) + A000267(n-1).
a(n) = floor(sqrt(4*n-1)) - 2*((n-1) mod (t+1)), where t = floor((sqrt(4*n-3)-1)/2). (End)
From Johannes W. Meijer, Sep 09 2013: (Start)
T(n, k) = n - 2*k + 2, for n >= 1 and 1 <= k <= floor((n+1)/2).
T(n, k) = A002260(n, n-2*k+2). (End)

A047273 Numbers that are congruent to {0, 1, 3, 5} mod 6.

Original entry on oeis.org

0, 1, 3, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19, 21, 23, 24, 25, 27, 29, 30, 31, 33, 35, 36, 37, 39, 41, 42, 43, 45, 47, 48, 49, 51, 53, 54, 55, 57, 59, 60, 61, 63, 65, 66, 67, 69, 71, 72, 73, 75, 77, 78, 79, 81, 83, 84, 85, 87, 89, 90, 91, 93, 95, 96, 97, 99, 101, 102, 103
Offset: 1

Views

Author

Keywords

Comments

Complement of A047235. - Reinhard Zumkeller, Oct 01 2008

Crossrefs

First differences of A281026.
See A301729 for an essentially identical sequence.

Programs

  • Haskell
    a047273 n = a047273_list !! (n-1)
    a047273_list = 0 : 1 : 3 : 5 : map (+ 6) a047273_list
    -- Reinhard Zumkeller, Feb 19 2013
    
  • Magma
    [(6*n-6+(-1)^(n div 2)+(-1)^(-n div 2))/4: n in [1..100]]; // Wesley Ivan Hurt, May 20 2016
  • Maple
    seq(2*(n-floor(n/4)) - (3-I^n-(-I)^n-(-1)^n)/4, n = 0..69); # Gary Detlefs, Mar 19 2010
  • Mathematica
    LinearRecurrence[{2,-2,2,-1},{0,1,3,5},80] (* Harvey P. Dale, Jan 04 2015 *)
  • PARI
    a(n)=n+(n+1)\4+(n+2)\4
    
  • Sage
    [(lucas_number1(n+2, 0, 1)+3*n)/2 for n in range(0, 70)] # Zerinvary Lajos, Mar 09 2009
    

Formula

G.f.: x*(1+x+x^2)/((1-x)^2*(1+x^2)) = x*(1-x^2)*(1-x^3)/((1-x)^3*(1-x^4)).
a(n) = n + A004524(n+1) = -a(-n) for all n in Z.
Starting (1, 3, 5, ...) = partial sums of (1, 2, 2, 1, 1, 2, 2, 1, 1, ...). - Gary W. Adamson, Jun 19 2008
A093719(a(n)) = 1. - Reinhard Zumkeller, Oct 01 2008
a(n) = 2*(n-floor(n/4)) - (3-I^n-(-I)^n-(-1)^n)/4, with offset 0..a(0)=0. - Gary Detlefs, Mar 19 2010
a(n) = (3*n-3+cos(Pi*n/2))/2. - R. J. Mathar, Oct 08 2010
From Wesley Ivan Hurt, May 20 2016: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>4.
a(n) = (6*n-6+(-1)^(n/2)+(-1)^(-n/2))/4. (End)
Euler transform of length 4 sequence [3, -1, -1, 1]. - Michael Somos, Jun 24 2017
Sum_{n>=2} (-1)^n/a(n) = log(2)/3 + log(3)/2. - Amiram Eldar, Dec 16 2021
E.g.f.: (2 + 3*exp(x)*(x - 1) + cos(x))/2. - Stefano Spezia, Jul 26 2024
Showing 1-10 of 33 results. Next