A008619 Positive integers repeated.
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, 37, 37, 38
Offset: 0
References
- D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 109, Eq. [6c]; p. 116, P(n,2).
- D. Parisse, 'The tower of Hanoi and the Stern-Brocot Array', Thesis, Munich 1997
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
- Andrei Asinowski, Cyril Banderier and Valerie Roitner, Generating functions for lattice paths with several forbidden patterns, (2019).
- Peter J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
- L. Colmenarejo, Combinatorics on several families of Kronecker coefficients related to plane partitions, arXiv:1604.00803 [math.CO], 2016. See Table 1 p. 5.
- Ricardo Gómez Aíza, Trees with flowers: A catalog of integer partition and integer composition trees with their asymptotic analysis, arXiv:2402.16111 [math.CO], 2024. See p. 23.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 120
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 209
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 351
- Gerzson Keri and Patric R. J. Östergård, The Number of Inequivalent (2R+3,7)R Optimal Covering Codes, Journal of Integer Sequences, Vol. 9 (2006), Article 06.4.7.
- L. F. Klosinski, G. L. Alexanderson and A. P. Hillman, The William Lowell Putnam Mathematical Competition, Amer. Math. Monthly 91 (1984), 487-495. See Problem B2.
- Donatella Merlini and Massimo Nocentini, Algebraic Generating Functions for Languages Avoiding Riordan Patterns, Journal of Integer Sequences, Vol. 21 (2018), Article 18.1.3.
- Narad Rampersad and Max Wiebe, Sums of products of binomial coefficients mod 2 and 2-regular sequences, arXiv:2309.04012 [math.NT], 2023.
- Bruce Reznick, Some binary partition functions, in "Analytic number theory" (Conf. in honor P. T. Bateman, Allerton Park, IL, 1989), 451-477, Progr. Math., 85, Birkhäuser Boston, Boston, MA, 1990.
- Alexandra Viel and Wolfgang Eisfeld, Effects of higher order Jahn-Teller coupling on the nuclear dynamics, J. Chem. Phys., 120, 4603 (2004).
- Eric Weisstein's World of Mathematics, Legendre-Gauss Quadrature
- Index entries for sequences related to Stern's sequences
- Index entries for related partition-counting sequences
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
- Index entries for Molien series
Crossrefs
Programs
-
Haskell
a008619 = (+ 1) . (`div` 2) a008619_list = concatMap (\x -> [x,x]) [1..] -- Reinhard Zumkeller, Apr 02 2012
-
Magma
I:=[1,1,2]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..100]]; // Vincenzo Librandi, Feb 04 2015
-
Maple
a:= n-> iquo(n+2, 2): seq(a(n), n=0..75);
-
Mathematica
Flatten[Table[{n,n},{n,35}]] (* Harvey P. Dale, Sep 20 2011 *) With[{c=Range[40]},Riffle[c,c]] (* Harvey P. Dale, Feb 23 2013 *) CoefficientList[Series[1/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *) LinearRecurrence[{1, 1, -1}, {1, 1, 2}, 75] (* Robert G. Wilson v, Feb 05 2015 *) Table[QBinomial[n, 2, -1], {n, 2, 75}] (* John Keith, Jun 28 2021 *)
-
PARI
a(n)=n\2+1
-
Python
def A008619(n): return (n>>1)+1 # Chai Wah Wu, Jul 07 2022
-
Sage
a = lambda n: 1 if n==0 else a(n-1)+1 if 2.divides(n) else a(n-1) # Peter Luschny, Feb 05 2015
-
Scala
(2 to 99).map( / 2) // _Alonso del Arte, May 09 2020
Formula
Euler transform of [1, 1].
a(n) = 1 + floor(n/2).
G.f.: 1/((1-x)(1-x^2)).
E.g.f.: ((3+2*x)*exp(x) + exp(-x))/4.
a(n) = a(n-1) + a(n-2) - a(n-3) = -a(-3-n).
a(0) = a(1) = 1 and a(n) = floor( (a(n-1) + a(n-2))/2 + 1 ).
a(n) = (2*n + 3 + (-1)^n)/4. - Paul Barry, May 27 2003
a(n) = Sum_{k=0..n} Sum_{j=0..k} Sum_{i=0..j} binomial(j, i)*(-2)^i. - Paul Barry, Aug 26 2003
E.g.f.: ((1+x)*exp(x) + cosh(x))/2. - Paul Barry, Sep 13 2003
a(n) = A108299(n-1,n)*(-1)^floor(n/2) for n > 0. - Reinhard Zumkeller, Jun 01 2005
a(n) = A108561(n+2,n) for n > 0. - Reinhard Zumkeller, Jun 10 2005
a(n) = ceiling(n/2), n >= 1. - Mohammad K. Azarian, May 22 2007
INVERT transformation yields A006054 without leading zeros. INVERTi transformation yields negative of A124745 with the first 5 terms there dropped. - R. J. Mathar, Sep 11 2008
a(n) = A026820(n,2) for n > 1. - Reinhard Zumkeller, Jan 21 2010
a(n) = n - a(n-1) + 1 (with a(0)=1). - Vincenzo Librandi, Nov 19 2010
a(n+1) = A181971(n,n). - Reinhard Zumkeller, Jul 09 2012
1/(1+2/(2+3/(3+4/(4+5/(5+...(continued fraction))))) = 1/(e-1), see A073333. - Philippe Deléham, Mar 09 2013
a(n) = floor(A000217(n)/n), n > 0. - L. Edson Jeffery, Jul 26 2013
a(n) = n*a(n-1) mod (n+1) = -a(n-1) mod (n+1), the least positive residue modulo n+1 for each expression for n > 0, with a(0) = 1 (basically restatements of Vincenzo Librandi's formula). - Rick L. Shepherd, Apr 02 2014
a(n) = (a(0) + a(1) + ... + a(n-1))/a(n-1), where a(0) = 1. - Melvin Peralta, Jun 16 2015
a(n) = Sum_{k=0..n} (-1)^(n-k) * (k+1). - Rick L. Shepherd, Sep 18 2020
a(n) = a(n-2) + 1 for n >= 2. - Vladimír Modrák, Sep 29 2020
a(n) = A004526(n)+1. - Chai Wah Wu, Jul 07 2022
Extensions
Additional remarks from Daniele Parisse
Edited by N. J. A. Sloane, Sep 06 2009
Partially edited by Joerg Arndt, Mar 11 2010
Comments