[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a010761 -id:a010761
     Sort: relevance | references | number | modified | created      Format: long | short | data
Nonnegative integers repeated, floor(n/2).
+10
476
0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36
OFFSET
0,5
COMMENTS
Number of elements in the set {k: 1 <= 2k <= n}.
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(2).
Dimension of the space of weight 1 modular forms for Gamma_1(n+1).
Number of ways 2^n is expressible as r^2 - s^2 with s > 0. Proof: (r+s) and (r-s) both should be powers of 2, even and distinct hence a(2k) = a(2k-1) = (k-1) etc. - Amarnath Murthy, Sep 20 2002
Lengths of sides of Ulam square spiral; i.e., lengths of runs of equal terms in A063826. - Donald S. McDonald, Jan 09 2003
Number of partitions of n into two parts. A008619 gives partitions of n into at most two parts, so A008619(n) = a(n) + 1 for all n >= 0. Partial sums are A002620 (Quarter-squares). - Rick L. Shepherd, Feb 27 2004
a(n+1) is the number of 1's in the binary expansion of the Jacobsthal number A001045(n). - Paul Barry, Jan 13 2005
Number of partitions of n+1 into two distinct (nonzero) parts. Example: a(8) = 4 because we have [8,1],[7,2],[6,3] and [5,4]. - Emeric Deutsch, Apr 14 2006
Complement of A000035, since A000035(n)+2*a(n) = n. Also equal to the partial sums of A000035. - Hieronymus Fischer, Jun 01 2007
Number of binary bracelets of n beads, two of them 0. For n >= 2, a(n-2) is the number of binary bracelets of n beads, two of them 0, with 00 prohibited. - Washington Bomfim, Aug 27 2008
Let A be the Hessenberg n X n matrix defined by: A[1,j] = j mod 2, A[i,i]:=1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n+1) = (-1)^n det(A). - Milan Janjic, Jan 24 2010
From Clark Kimberling, Mar 10 2011: (Start)
Let RT abbreviate rank transform (A187224). Then
RT(this sequence) = A187484;
RT(this sequence without 1st term) = A026371;
RT(this sequence without 1st 2 terms) = A026367;
RT(this sequence without 1st 3 terms) = A026363. (End)
The diameter (longest path) of the n-cycle. - Cade Herron, Apr 14 2011
For n >= 3, a(n-1) is the number of two-color bracelets of n beads, three of them are black, having a diameter of symmetry. - Vladimir Shevelev, May 03 2011
Pelesko (2004) refers erroneously to this sequence instead of A008619. - M. F. Hasler, Jul 19 2012
Number of degree 2 irreducible characters of the dihedral group of order 2(n+1). - Eric M. Schmidt, Feb 12 2013
For n >= 3 the sequence a(n-1) is the number of non-congruent regions with infinite area in the exterior of a regular n-gon with all diagonals drawn. See A217748. - Martin Renner, Mar 23 2013
a(n) is the number of partitions of 2n into exactly 2 even parts. a(n+1) is the number of partitions of 2n into exactly 2 odd parts. This just rephrases the comment of E. Deutsch above. - Wesley Ivan Hurt, Jun 08 2013
Number of the distinct rectangles and square in a regular n-gon is a(n/2) for even n and n >= 4. For odd n, such number is zero, see illustration in link. - Kival Ngaokrajang, Jun 25 2013
x-coordinate from the image of the point (0,-1) after n reflections across the lines y = n and y = x respectively (alternating so that one reflection is applied on each step): (0,-1) -> (0,1) -> (1,0) -> (1,2) -> (2,1) -> (2,3) -> ... . - Wesley Ivan Hurt, Jul 12 2013
a(n) is the number of partitions of 2n into exactly two distinct odd parts. a(n-1) is the number of partitions of 2n into exactly two distinct even parts, n > 0. - Wesley Ivan Hurt, Jul 21 2013
a(n) is the number of permutations of length n avoiding 213, 231 and 312, or avoiding 213, 312 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Also a(n) is the number of different patterns of 2-color, 2-partition of n. - Ctibor O. Zizka, Nov 19 2014
Minimum in- and out-degree for a directed K_n (see link). - Jon Perry, Nov 22 2014
a(n) is also the independence number of the triangular graph T(n). - Luis Manuel Rivera Martínez, Mar 12 2015
For n >= 3, a(n+4) is the least positive integer m such that every m-element subset of {1,2,...,n} contains distinct i, j, k with i + j = k (equivalently, with i - j = k). - Rick L. Shepherd, Jan 24 2016
More generally, the ordinary generating function for the integers repeated k times is x^k/((1 - x)(1 - x^k)). - Ilya Gutkovskiy, Mar 21 2016
a(n) is the number of numbers of the form F(i)*F(j) between F(n+3) and F(n+4), where 2 < i < j and F = A000045 (Fibonacci numbers). - Clark Kimberling, May 02 2016
The arithmetic function v_2(n,2) as defined in A289187. - Robert Price, Aug 22 2017
a(n) is also the total domination number of the (n-3)-gear graph. - Eric W. Weisstein, Apr 07 2018
Consider the numbers 1, 2, ..., n; a(n) is the largest integer t such that these numbers can be arranged in a row so that all consecutive terms differ by at least t. Example: a(6) = a(7) = 3, because of respectively (4, 1, 5, 2, 6, 3) and (1, 5, 2, 6, 3, 7, 4) (see link BMO - Problem 2). - Bernard Schott, Mar 07 2020
a(n-1) is also the number of integer-sided triangles whose sides a < b < c are in arithmetic progression with a middle side b = n (see A307136). Example, for b = 4, there exists a(3) = 1 such triangle corresponding to Pythagorean triple (3, 4, 5). For the triples, miscellaneous properties and references, see A336750. - Bernard Schott, Oct 15 2020
For n >= 1, a(n-1) is the greatest remainder on division of n by any k in 1..n. - David James Sycamore, Sep 05 2021
Number of incongruent right triangles that can be formed from the vertices of a regular n-gon is given by a(n/2) for n even. For n odd such number is zero. For a regular n-gon, the number of incongruent triangles formed from its vertices is given by A069905(n). The number of incongruent acute triangles is given by A005044(n). The number of incongruent obtuse triangles is given by A008642(n-4) for n > 3 otherwise 0, with offset 0. - Frank M Jackson, Nov 26 2022
The inverse binomial transform is 0, 0, 1, -2, 4, -8, 16, -32, ... (see A122803). - R. J. Mathar, Feb 25 2023
REFERENCES
G. L. Alexanderson et al., The William Powell Putnam Mathematical Competition - Problems and Solutions: 1965-1984, M.A.A., 1985; see Problem A-1 of 27th Competition.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 120, P(n,2).
Graham, Knuth and Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1989, page 77 (partitions of n into at most 2 parts).
LINKS
Jonathan Bloom and Nathan McNew, Counting pattern-avoiding integer partitions, arXiv:1908.03953 [math.CO], 2019.
British Mathematical Olympiad, 2011/2012 - Round 1 - Problem 2.
Shalosh B. Ekhad and Doron Zeilberger, In How many ways can I carry a total of n coins in my two pockets, and have the same amount in both pockets?, arXiv:1901.08172 [math.CO], 2019.
Andreas M. Hinz and Paul K. Stockmeyer, Precious Metal Sequences and Sierpinski-Type Graphs, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
John A. Pelesko, Generalizing the Conway-Hofstadter $10,000 Sequence, Journal of Integer Sequences, Vol. 7 (2004), Article 04.3.5.
William A. Stein, The modular forms database.
Eric Weisstein's World of Mathematics, Gear Graph.
Eric Weisstein's World of Mathematics, Prime Partition
Eric Weisstein's World of Mathematics, Total Domination Number.
FORMULA
G.f.: x^2/((1+x)*(x-1)^2).
a(n) = floor(n/2).
a(n) = ceiling((n+1)/2). - Eric W. Weisstein, Jan 11 2024
a(n) = 1 + a(n-2).
a(n) = a(n-1) + a(n-2) - a(n-3).
a(2*n) = a(2*n+1) = n.
a(n+1) = n - a(n). - Henry Bottomley, Jul 25 2001
For n > 0, a(n) = Sum_{i=1..n} (1/2)/cos(Pi*(2*i-(1-(-1)^n)/2)/(2*n+1)). - Benoit Cloitre, Oct 11 2002
a(n) = (2*n-1)/4 + (-1)^n/4; a(n+1) = Sum_{k=0..n} k*(-1)^(n+k). - Paul Barry, May 20 2003
E.g.f.: ((2*x-1)*exp(x) + exp(-x))/4. - Paul Barry, Sep 03 2003
G.f.: (1/(1-x)) * Sum_{k >= 0} t^2/(1-t^4) where t = x^2^k. - Ralf Stephan, Feb 24 2004
a(n+1) = A000120(A001045(n)). - Paul Barry, Jan 13 2005
a(n) = (n-(1-(-1)^n)/2)/2 = (1/2)*(n-|sin(n*Pi/2)|). Likewise: a(n) = (n-A000035(n))/2. Also: a(n) = Sum_{k=0..n} A000035(k). - Hieronymus Fischer, Jun 01 2007
The expression floor((x^2-1)/(2*x)) (x >= 1) produces this sequence. - Mohammad K. Azarian, Nov 08 2007; corrected by M. F. Hasler, Nov 17 2008
a(n+1) = A002378(n) - A035608(n). - Reinhard Zumkeller, Jan 27 2010
a(n+1) = A002620(n+1) - A002620(n) = floor((n+1)/2)*ceiling((n+1)/2) - floor(n^2/4). - Jonathan Vos Post, May 20 2010
For n >= 2, a(n) = floor(log_2(2^a(n-1) + 2^a(n-2))). - Vladimir Shevelev, Jun 22 2010
a(n) = A180969(2,n). - Adriano Caroli, Nov 24 2010
A001057(n-1) = (-1)^n*a(n), n > 0. - M. F. Hasler, Jul 19 2012
a(n) = A008615(n) + A002264(n). - Reinhard Zumkeller, Apr 28 2014
Euler transform of length 2 sequence [1, 1]. - Michael Somos, Jul 03 2014
EXAMPLE
G.f. = x^2 + x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + 5*x^10 + ...
MAPLE
A004526 := n->floor(n/2); seq(floor(i/2), i=0..50);
MATHEMATICA
Table[(2n - 1)/4 + (-1)^n/4, {n, 0, 70}] (* Stefan Steinerberger, Apr 02 2006 *)
f[n_] := If[OddQ[n], (n - 1)/2, n/2]; Array[f, 74, 0] (* Robert G. Wilson v, Apr 20 2012 *)
With[{c=Range[0, 40]}, Riffle[c, c]] (* Harvey P. Dale, Aug 26 2013 *)
CoefficientList[Series[x^2/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)
LinearRecurrence[{1, 1, -1}, {0, 0, 1}, 75] (* Robert G. Wilson v, Feb 05 2015 *)
Floor[Range[0, 40]/2] (* Eric W. Weisstein, Apr 07 2018 *)
PROG
(PARI) a(n)=n\2 /* Jaume Oliver Lafont, Mar 25 2009 */
(PARI) x='x+O('x^100); concat([0, 0], Vec(x^2/((1+x)*(x-1)^2))) \\ Altug Alkan, Mar 21 2016
(Haskell)
a004526 = (`div` 2)
a004526_list = concatMap (\x -> [x, x]) [0..]
-- Reinhard Zumkeller, Jul 27 2012
(Maxima) makelist(floor(n/2), n, 0, 50); /* Martin Ettl, Oct 17 2012 */
(Sage) def a(n) : return( dimension_cusp_forms( Gamma0(2), 2*n+4) ); # Michael Somos, Jul 03 2014
(Sage) def a(n) : return( dimension_modular_forms( Gamma1(n+1), 1) ); # Michael Somos, Jul 03 2014
(Magma) [Floor(n/2): n in [0..100]]; // Vincenzo Librandi, Nov 19 2014
(Python)
def a(n): return n//2
print([a(n) for n in range(74)]) # Michael S. Branicky, Apr 30 2022
CROSSREFS
a(n+2) = A008619(n). See A008619 for more references.
A001477(n) = a(n+1)+a(n). A000035(n) = a(n+1)-A002456(n).
a(n) = A008284(n, 2), n >= 1.
Zero followed by the partial sums of A000035.
Column 2 of triangle A094953. Second row of A180969.
Partial sums: A002620. Other related sequences: A010872, A010873, A010874.
Cf. similar sequences of the integers repeated k times: A001477 (k = 1), this sequence (k = 2), A002264 (k = 3), A002265 (k = 4), A002266 (k = 5), A152467 (k = 6), A132270 (k = 7), A132292 (k = 8), A059995 (k = 10).
Cf. A289187, A139756 (binomial transf).
KEYWORD
nonn,easy,core,nice
EXTENSIONS
Partially edited by Joerg Arndt, Mar 11 2010, and M. F. Hasler, Jul 19 2012
STATUS
approved
Nonnegative integers repeated 3 times.
+10
122
0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25
OFFSET
0,7
COMMENTS
Complement of A010872, since A010872(n) + 3*a(n) = n. - Hieronymus Fischer, Jun 01 2007
Chvátal proved that, given an arbitrary n-gon, there exist a(n) points such that all points in the interior are visible from at least one of those points; further, for all n >= 3, there exists an n-gon which cannot be covered in this fashion with fewer than a(n) points. This is known as the "art gallery problem". - Charles R Greathouse IV, Aug 29 2012
The inverse binomial transform is 0, 0, 0, 1, -3, 6, -9, 9, 0, -27, 81, -162, 243, -243, 0, 729,.. (see A000748). - R. J. Mathar, Feb 25 2023
LINKS
Václav Chvátal, A combinatorial theorem in plane geometry, Journal of Combinatorial Theory, Series B 18 (1975), pp. 39-41, doi:10.1016/0095-8956(75)90061-1.
Clark Kimberling, A Combinatorial Classification of Triangle Centers on the Line at Infinity, J. Int. Seq., Vol. 22 (2019), Article 19.5.4.
FORMULA
a(n) = floor(n/3).
a(n) = (3*n-3-sqrt(3)*(1-2*cos(2*Pi*(n-1)/3))*sin(2*Pi*(n-1)/3)))/9. - Hieronymus Fischer, Sep 18 2007
a(n) = (n - A010872(n))/3. - Hieronymus Fischer, Sep 18 2007
Complex representation: a(n) = (n - (1 - r^n)*(1 + r^n/(1 - r)))/3 where r = exp(2*Pi/3*i) = (-1 + sqrt(3)*i)/2 and i = sqrt(-1). - Hieronymus Fischer, Sep 18 2007; - corrected by Guenther Schrack, Sep 26 2019
a(n) = Sum_{k=0..n-1} A022003(k). - Hieronymus Fischer, Sep 18 2007
G.f.: x^3/((1-x)*(1-x^3)). - Hieronymus Fischer, Sep 18 2007
a(n) = (n - 1 + 2*sin(4*(n+2)*Pi/3)/sqrt(3))/3. - Jaume Oliver Lafont, Dec 05 2008
For n >= 3, a(n) = floor(log_3(3^a(n-1) + 3^a(n-2) + 3^a(n-3))). - Vladimir Shevelev, Jun 22 2010
a(n) = (n - 3 + A010872(n-1) + A010872(n-2))/3 using Zumkeller's 2008 formula in A010872. - Adriano Caroli, Nov 23 2010
a(n) = A004526(n) - A008615(n). - Reinhard Zumkeller, Apr 28 2014
a(2*n) = A004523(n) and a(2*n+1) = A004396(n). - L. Edson Jeffery, Jul 30 2014
a(n) = n - 2 - a(n-1) - a(n-2) for n > 1 with a(0) = a(1) = 0. - Derek Orr, Apr 28 2015
From Wesley Ivan Hurt, May 27 2015: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4), n > 4.
a(n) = (n - 1 + 0^((-1)^(n/3) - (-1)^n) - 0^((-1)^(n/3)*(-1)^(1/3) + (-1)^n))/3. (End)
a(n) = (3*n - 3 + r^n*(1 - r) + r^(2*n)*(r + 2))/9 where r = (-1 + sqrt(-3))/2. - Guenther Schrack, Sep 26 2019
E.g.f.: exp(x)*(x - 1)/3 + exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 17 2022
MAPLE
seq(i$3, i=0..100); # Robert Israel, Aug 04 2014
MATHEMATICA
Flatten[Table[{n, n, n}, {n, 0, 25}]] (* Harvey P. Dale, Jun 09 2013 *)
Floor[Range[0, 20]/3] (* Eric W. Weisstein, Aug 12 2023 *)
Table[Floor[n/3], {n, 0, 20}] (* ~~~ *)
Table[(n - Cos[2 (n - 2) Pi/3] + Sin[2 (n - 2) Pi/3]/Sqrt[3] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *)
Table[(n - ChebyshevU[n - 2, -1/2] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Aug 12 2023 *)
LinearRecurrence[{1, 0, 1, -1}, {0, 0, 0, 1}, 20] (* Eric W. Weisstein, Aug 12 2023 *)
CoefficientList[Series[x^3/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Aug 12 2023 *)
PROG
(PARI) a(n)=n\3 /* Jaume Oliver Lafont, Mar 25 2009 */
(Sage) [floor(n/3) for n in range(0, 79)] # Zerinvary Lajos, Dec 01 2009
(Haskell)
a002264 n = a002264_list !! n
a002264_list = 0 : 0 : 0 : map (+ 1) a002264_list
-- Reinhard Zumkeller, Nov 06 2012, Apr 16 2012
(PARI) v=[0, 0]; for(n=2, 50, v=concat(v, n-2-v[#v]-v[#v-1])); v \\ Derek Orr, Apr 28 2015
(Magma) [Floor(n/3): n in [0..100]]; // Vincenzo Librandi, Apr 29 2015
(Magma) &cat [[n, n, n]: n in [0..30]]; // Bruno Berselli, Apr 29 2015
CROSSREFS
Partial sums give A130518.
Cf. A004523 interlaced with A004396.
Apart from the zeros, this is column 3 of A235791.
KEYWORD
nonn,easy
STATUS
approved
Integers repeated 5 times.
+10
52
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16
OFFSET
0,11
COMMENTS
For n > 3, number of consecutive "11's" after the (n+3) "1's" in the continued fraction for sqrt(L(n+2)/L(n)) where L(n) is the n-th Lucas number A000032 (see example). E.g., the continued fraction for sqrt(L(11)/L(9)) is [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 58, 2, 4, 1, ...] with 12 consecutive ones followed by floor(11/5)=2 elevens. - Benoit Cloitre, Jan 08 2006
Complement of A010874, since A010874(n) + 5*a(n) = n. - Hieronymus Fischer, Jun 01 2007
From Paul Curtz, May 13 2020: (Start)
Main N-S vertical of the pentagonal spiral built with this sequence is A001105:
21
20 15 15
20 14 10 10 15
20 14 9 6 6 10 15
20 14 9 5 3 3 6 10 15
20 14 9 5 2 1 1 3 6 10 16
19 14 9 5 2 0 0 0 1 3 6 11 16
19 13 9 5 2 0 0 1 3 7 11 16
19 13 8 5 2 2 1 4 7 11 16
19 13 8 4 4 4 4 7 11 16
19 13 8 8 8 7 7 11 17
18 13 12 12 12 12 12 17
18 18 18 18 17 17 17
The main S-N vertical and the next one are A000217. (End)
FORMULA
a(n) = floor(n/5), n >= 0.
G.f.: x^5/((1-x)(1-x^5)).
a(n) = (n - A010874(n))/5. - Hieronymus Fischer, May 29 2007
For n >= 5, a(n) = floor(log_5(5^a(n-1) + 5^a(n-2) + 5^a(n-3) + 5^a(n-4) + 5^a(n-5))). - Vladimir Shevelev, Jun 22 2010
Sum_{n>=5} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Sep 30 2022
MAPLE
A002266:=n->floor(n/5); seq(A002266(n), n=0..100); # Wesley Ivan Hurt, Dec 10 2013
MATHEMATICA
Table[Floor[n/5], {n, 0, 20}] (* Wesley Ivan Hurt, Dec 10 2013 *)
Table[{n, n, n, n, n}, {n, 0, 20}]//Flatten (* Harvey P. Dale, Jun 17 2022 *)
PROG
(Sage) [floor(n/5) - 1 for n in range(5, 88)] # Zerinvary Lajos, Dec 01 2009
(Haskell)
a002266 = (`div` 5)
a002266_list = [0, 0, 0, 0, 0] ++ map (+ 1) a002266_list
-- Reinhard Zumkeller, Nov 27 2012
(PARI) a(n)=n\5 \\ Charles R Greathouse IV, Dec 10 2013
(Python)
def A002266(n): return n//5 # Chai Wah Wu, Nov 08 2022
CROSSREFS
KEYWORD
nonn,easy
EXTENSIONS
Incorrect formula removed by Ridouane Oudra, Oct 16 2021
STATUS
approved
a(n) = floor(n/2) * floor(n/3).
+10
8
0, 0, 1, 2, 2, 6, 6, 8, 12, 15, 15, 24, 24, 28, 35, 40, 40, 54, 54, 60, 70, 77, 77, 96, 96, 104, 117, 126, 126, 150, 150, 160, 176, 187, 187, 216, 216, 228, 247, 260, 260, 294, 294, 308, 330, 345, 345, 384, 384, 400, 425, 442, 442, 486, 486, 504, 532, 551
OFFSET
1,4
COMMENTS
a(n) is also the number of 5 boxes polyomino (invert U patterns) packing into n X n square. The 6 boxes 2 X 3 (rectangular patterns) also gives the same sequence but difference in squares left. See illustration in links. - Kival Ngaokrajang, Nov 10 2013
FORMULA
a(n) = A004526(n) * A002264(n). - Reinhard Zumkeller, Jul 25 2005
a(n) = a(n-2) + a(n-3) - a(n-5) + a(n-6) - a(n-8) - a(n-9) + a(n-11). - Clark Kimberling, May 18 2012
G.f.: -x^3*(x^7+x^6+x^5+2*x^4+3*x^3+x^2+2*x+1) / ((x-1)^3*(x+1)^2*(x^2-x+1)*(x^2+x+1)^2). - Colin Barker, Apr 05 2013
Sum_{n>=3} (-1)^(n+1)/a(n) = sqrt(3)*Pi/4 + 9*log(3)/4 - 2*log(2) - 3/2. - Amiram Eldar, Mar 30 2023
MAPLE
[ seq(floor(n/2)*floor(n/3), n=1..64) ];
MATHEMATICA
Table[Floor[n/2]*Floor[n/3], {n, 1, 70}] (* Clark Kimberling, May 18 2012 *)
CoefficientList[Series[- x^2 x^7 + x^6 + x^5 + 2 x^4 + 3 x^3 + x^2 + 2 x+1)/((x - 1)^3 (x + 1)^2 (x^2 - x + 1) (x^2 + x + 1)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 15 2013 *)
LinearRecurrence[{0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 1}, {0, 0, 1, 2, 2, 6, 6, 8, 12, 15, 15}, 60] (* Harvey P. Dale, Jan 09 2016 *)
PROG
(Magma) [Floor(n/2)*Floor(n/3) : n in [1..50]]; // Wesley Ivan Hurt, Jun 22 2014
(PARI) a(n)=n\2 + n\3 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved
a(n) = floor(n/2) + floor(n/5).
+10
6
0, 0, 1, 1, 2, 3, 4, 4, 5, 5, 7, 7, 8, 8, 9, 10, 11, 11, 12, 12, 14, 14, 15, 15, 16, 17, 18, 18, 19, 19, 21, 21, 22, 22, 23, 24, 25, 25, 26, 26, 28, 28, 29, 29, 30, 31, 32, 32, 33, 33, 35, 35, 36, 36, 37, 38, 39, 39, 40, 40, 42, 42, 43, 43, 44, 45, 46, 46, 47, 47, 49, 49, 50, 50
OFFSET
0,5
FORMULA
a(n) = A004526(n) + A002266(n).
G.f.: x^2*(1+x+x^2+2*x^3+2*x^4) / ( (1+x)*(x^4+x^3+x^2+x+1)*(x-1)^2 ). - R. J. Mathar, Feb 20 2011
a(n) = 7n/10 + O(1). - Charles R Greathouse IV, Jun 11 2015
MATHEMATICA
Table[Floor[n/2]+Floor[n/5], {n, 0, 80}] (* or *) LinearRecurrence[ {0, 1, 0, 0, 1, 0, -1}, {0, 0, 1, 1, 2, 3, 4}, 80] (* Harvey P. Dale, Dec 26 2015 *)
PROG
(PARI) a(n)=n\2 + n\5 \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jul 25 2005
STATUS
approved
Number of integer points in a certain quadrilateral scaled by a factor of n (another version).
+10
4
0, 0, 1, 3, 6, 9, 14, 19, 25, 32, 40, 48, 58, 68, 79, 91, 104, 117, 132, 147, 163, 180, 198, 216, 236, 256, 277, 299, 322, 345, 370, 395, 421, 448, 476, 504, 534, 564, 595, 627, 660, 693, 728, 763, 799, 836, 874, 912, 952, 992, 1033, 1075, 1118, 1161, 1206
OFFSET
1,4
COMMENTS
The quadrilateral is given by four vertices [(1/2, 1/3), (0, 1), (0, 0), (1, 0)] as an example on page 22 of Ehrhart 1967. Here the open line segment from (1/2, 1/3) to (0, 1) is included but the rest of the boundary is not. The sequence is denoted by d'(n).
From Gus Wiseman, Oct 18 2020: (Start)
Also the number of ordered triples of positive integers summing to n that are not strictly increasing. For example, the a(3) = 1 through a(7) = 14 triples are:
(1,1,1) (1,1,2) (1,1,3) (1,1,4) (1,1,5)
(1,2,1) (1,2,2) (1,3,2) (1,3,3)
(2,1,1) (1,3,1) (1,4,1) (1,4,2)
(2,1,2) (2,1,3) (1,5,1)
(2,2,1) (2,2,2) (2,1,4)
(3,1,1) (2,3,1) (2,2,3)
(3,1,2) (2,3,2)
(3,2,1) (2,4,1)
(4,1,1) (3,1,3)
(3,2,2)
(3,3,1)
(4,1,2)
(4,2,1)
(5,1,1)
A001399(n-6) counts the complement (unordered strict triples).
A014311 \ A333255 ranks these compositions.
A140106 is the unordered version.
A337484 is the case not strictly decreasing either.
A337698 counts these compositions of any length, with complement A000009.
A001399(n-6) counts unordered strict triples.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A069905 counts unordered triples.
A218004 counts strictly increasing or weakly decreasing compositions.
A337483 counts triples either weakly increasing or weakly decreasing.
(End)
LINKS
E. Ehrhart, Sur un problème de géométrie diophantienne linéaire I, (Polyèdres et réseaux), J. Reine Angew. Math. 226 1967 1-29. MR0213320 (35 #4184).
E. Ehrhart, Sur un problème de géométrie diophantienne linéaire I, (Polyèdres et réseaux), J. Reine Angew. Math. 226 1967 1-29. MR0213320 (35 #4184). [Annotated scanned copy of pages 16 and 22 only]
E. Ehrhart, Sur un problème de géométrie diophantienne linéaire II. Systemes diophantiens lineaires, J. Reine Angew. Math. 227 1967 25-49. [Annotated scanned copy of pages 47-49 only]
FORMULA
G.f.: x^3 * (1 + 2*x + 2*x^2) / (1 - x - x^2 + x^4 + x^5 - x^6) = (x^3 + x^4 + x^5 + 2*x^7) / ((1 - x)^2 * (1 - x^6)).
a(n) = floor( A147874(n) / 12).
a(-n) = A002789(n).
a(n+1) - a(n) = A010761(n).
For n >= 6, a(n) = A000217(n-2) - A001399(n-6). - Gus Wiseman, Oct 18 2020
EXAMPLE
G.f. = x^3 + 3*x^4 + 6*x^5 + 9*x^6 + 14*x^7 + 19*x^8 + 25*x^9 + 32*x^10 + ...
MATHEMATICA
a[ n_] := Quotient[ 7 - 12 n + 5 n^2, 12];
a[ n_] := With[ {o = Boole[ 0 < n], c = Boole[ 0 >= n], m = Abs@n}, Length @ FindInstance[ 0 < c + x && 0 < c + y && (2 x < c + m && 4 x + 3 y < o + 3 m || m < o + 2 x && 2 x + 3 y < c + 2 m), {x, y}, Integers, 10^9]];
LinearRecurrence[{1, 1, 0, -1, -1, 1}, {0, 0, 1, 3, 6, 9}, 90] (* Harvey P. Dale, May 28 2015 *)
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n, {3}], !Less@@#&]], {n, 0, 15}] (* Gus Wiseman, Oct 18 2020 *)
PROG
(PARI) {a(n) = (7 - 12*n + 5*n^2) \ 12};
(PARI) {a(n) = if( n<0, polcoeff( x * (2 + x^2 + x^3 + x^4) / ((1 - x)^2 * (1 - x^6)) + x * O(x^-n), -n), polcoeff( x^3 * (1 + x + x^2 + 2*x^4) / ((1 - x)^2 * (1 - x^6)) + x * O(x^n), n))};
(Magma) [Floor((5*n-7)*(n-1)/12): n in [1..60]]; // Vincenzo Librandi, Jun 27 2015
KEYWORD
nonn
AUTHOR
Michael Somos, May 22 2014
STATUS
approved
a(n) = ceiling( n / 2 ) + ceiling( n / 3 ).
+10
2
2, 2, 3, 4, 5, 5, 7, 7, 8, 9, 10, 10, 12, 12, 13, 14, 15, 15, 17, 17, 18, 19, 20, 20, 22, 22, 23, 24, 25, 25, 27, 27, 28, 29, 30, 30, 32, 32, 33, 34, 35, 35, 37, 37, 38, 39, 40, 40, 42, 42, 43, 44, 45, 45, 47, 47, 48, 49, 50, 50, 52, 52, 53, 54, 55, 55, 57
OFFSET
1,1
FORMULA
G.f.: x * (2 + 2*x + x^2) / (1 - x^2 - x^3 + x^5) = (2*x + 2*x^2 + x^3) / ((1 - x^2) * (1 - x^3)).
a(n) = - A010761(-n) = 2 - a(1-n). a(n) = A002789(n) - A002789(n-1) for all n in Z.
a(n) = Sum_{k=1..n} A000035(k) + A000035(A010872(k)). - Benedict W. J. Irwin, Apr 13 2016
E.g.f.: 5*x*exp(x)/6 - exp(-x)/4 + 7*exp(x)/12 + sin(sqrt(3)*x/2)*exp(-x/2)/(3*sqrt(3)) - cos(sqrt(3)*x/2)*exp(-x/2)/3. - Ilya Gutkovskiy, Apr 13 2016
EXAMPLE
G.f. = 2*x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 5*x^6 + 7*x^7 + 7*x^8 + ...
MAPLE
A242774:=n->ceil(n/2)+ceil(n/3): seq(A242774(n), n=1..100); # Wesley Ivan Hurt, Apr 13 2016
MATHEMATICA
a[ n_] := Ceiling[ n / 2 ] + Ceiling[ n / 3 ];
LinearRecurrence[{0, 1, 1, 0, -1}, {2, 2, 3, 4, 5}, 100] (* Vincenzo Librandi, Apr 15 2016 *)
Rest[CoefficientList[Series[x*(2+2*x+x^2)/(1-x^2-x^3+x^5), {x, 0, 50}], x]] (* G. C. Greubel, Aug 06 2018 *)
PROG
(PARI) {a(n) = ceil( n / 2 ) + ceil( n / 3 )};
(PARI) {a(n) = if( n<0, polcoeff( -(x^2 + 2*x^3 + 2*x^4) / ((1 - x^2) * (1 - x^3)) + x * O(x^-n), -n), polcoeff( (2*x + 2*x^2 + x^3) / ((1 - x^2) * (1 - x^3)) + x * O(x^n), n))};
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(2+2*x+x^2)/(1-x^2-x^3+x^5))); // G. C. Greubel, Aug 06 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, May 22 2014
STATUS
approved
Expansion of x*(1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7) / (1 - x - 2*x^4 + 2*x^5 + x^8 - x^9).
+10
2
0, 1, 2, 20, 30, 31, 44, 98, 120, 121, 146, 236, 270, 271, 308, 434, 480, 481, 530, 692, 750, 751, 812, 1010, 1080, 1081, 1154, 1388, 1470, 1471, 1556, 1826, 1920, 1921, 2018, 2324, 2430, 2431, 2540, 2882, 3000, 3001, 3122, 3500, 3630, 3631, 3764, 4178, 4320, 4321
OFFSET
0,3
COMMENTS
The sequence lists all m, in increasing order, such that floor(m/2) + floor(m/3) is a square.
FORMULA
G.f.: x*(1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2).
a(n) = (30*(n-1)*n + 2*(18*n-3*(-1)^n-11)*(-1)^(n*(n+1)/2) - (6*n+1)*(-1)^n + 13)/16 + 1. Therefore:
a(4*k) = 30*k^2;
a(4*k+1) = 30*k^2 + 1;
a(4*k+2) = 30*k^2 + 12*k + 2;
a(4*k+3) = 30*k^2 + 48*k + 20.
MATHEMATICA
CoefficientList[x (1 + x + 18 x^2 + 10 x^3 - x^4 + 11 x^5 + 18 x^6 + 2 x^7)/((1 + x)^2 (1 - x)^3 (1 + x^2)^2) + O[x]^50, x]
PROG
(Sage) gf = x*(1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2); taylor(gf, x, 0, 50).list()
(PARI) concat(0, Vec((1 + x+18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2) + O(x^50)))
(Maxima) makelist(coeff(taylor(x*(1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2), x, 0, n), x, n), n, 0, 50);
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!((1 + x + 18*x^2 + 10*x^3 - x^4 + 11*x^5 + 18*x^6 + 2*x^7)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2)));
CROSSREFS
Cf. A010761.
Cf. A268251: nonnegative m for which floor(m/2)*floor(m/3) is a square.
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Feb 12 2016
STATUS
approved
a(n) = floor(n/2) + floor(n/3) - floor(n/4).
+10
1
0, 0, 1, 2, 2, 2, 4, 4, 4, 5, 6, 6, 7, 7, 8, 9, 9, 9, 11, 11, 11, 12, 13, 13, 14, 14, 15, 16, 16, 16, 18, 18, 18, 19, 20, 20, 21, 21, 22, 23, 23, 23, 25, 25, 25, 26, 27, 27, 28, 28, 29, 30, 30, 30, 32, 32, 32, 33, 34, 34, 35, 35, 36, 37, 37, 37, 39, 39, 39, 40, 41, 41, 42, 42, 43, 44, 44, 44, 46, 46, 46, 47, 48
OFFSET
0,4
FORMULA
a(n) = floor(n/2) + floor(n/3) - floor(n/4).
G.f.: x^2*(1 + 2*x + 2*x^2 + x^3 + x^4) / ( (1+x)*(x^2+1)*(1+x+x^2)*(x-1)^2 ). - R. J. Mathar, Mar 08 2011
For n > 0, a(n) = A010761(n) - A002265(n). - Bruno Berselli, Mar 08 2011
MATHEMATICA
Table[Floor[n/2]+Floor[n/3]-Floor[n/4], {n, 0, 120}]
PROG
(Magma) [Floor(n/2)+Floor(n/3)-Floor(n/4): n in [0..85] ]; // Vincenzo Librandi, Jul 18 2011
(Python)
def A187324(n): return (n>>2)+bool(n&2)+n//3 # Chai Wah Wu, Jan 31 2023
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 08 2011
STATUS
approved

Search completed in 0.022 seconds