login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008619 Positive integers repeated. 230

%I #237 Mar 01 2024 09:58:17

%S 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,

%T 15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,

%U 27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34,35,35,36,36,37,37,38

%N Positive integers repeated.

%C The floor of the arithmetic mean of the first n+1 positive integers. - _Cino Hilliard_, Sep 06 2003

%C Number of partitions of n into powers of 2 where no power is used more than three times, or 4th binary partition function (see A072170).

%C Number of partitions of n in which the greatest part is at most 2. - _Robert G. Wilson v_, Jan 11 2002

%C Number of partitions of n into at most 2 parts. - _Jon Perry_, Jun 16 2003

%C a(n) = #{k=0..n: k+n is even}. - _Paul Barry_, Sep 13 2003

%C Number of symmetric Dyck paths of semilength n+2 and having two peaks. E.g., a(6)=4 because we have UUUUUUU*DU*DDDDDDD, UUUUUU*DDUU*DDDDDD, UUUUU*DDDUUU*DDDDD and UUUU*DDDDUUUU*DDDD, where U=(1,1), D=(1,-1) and * indicates a peak. - _Emeric Deutsch_, Jan 12 2004

%C Smallest positive integer whose harmonic mean with another positive integer is n (for n > 0). For example, a(6)=4 is already given (as 4 is the smallest positive integer such that the harmonic mean of 4 (with 12) is 6) - but the harmonic mean of 2 (with -6) is also 6 and 2 < 4, so the two positive integer restrictions need to be imposed to rule out both 2 and -6.

%C Second outermost diagonal of Losanitsch's triangle (A034851). - _Alonso del Arte_, Mar 12 2006

%C Arithmetic mean of n-th row of A080511. - _Amarnath Murthy_, Mar 20 2003

%C a(n) is the number of ways to pay n euros (or dollars) with coins of one and two euros (respectively dollars). - _Richard Choulet_ and _Robert G. Wilson v_, Dec 31 2007

%C Inverse binomial transform of A045623. - _Philippe Deléham_, Dec 30 2008

%C Coefficient of q^n in the expansion of (m choose 2)_q as m goes to infinity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002

%C This Itakura comment follows from a partial fraction decomposition (m choose 2)_q = [(1-q^(2m-2))/(1+q) + (1-q^(2m-2))/(1-q) +2 (1-q^(m-1))^2/(1-q)^2]/4. Interpreted as generating functions in q, they have convolution structures; the first term in the numerator creates +1,-1,+1,-1 etc, the 2nd term creates +1,+1,+1,+1 etc., the 3rd term 2,4,6,8, etc. as m->infinity. - _R. J. Mathar_, Sep 25 2008

%C Binomial transform of (-1)^n*A034008(n) = [1,0,1,-2,4,-8,16,-32,...]. - _Philippe Deléham_, Nov 15 2009

%C From Jon Perry_, Nov 16 2010: (Start)

%C Column sums of:

%C 1 1 1 1 1 1...

%C 1 1 1 1...

%C 1 1...

%C ..............

%C --------------

%C 1 1 2 2 3 3... (End)

%C This sequence is also the half-convolution of the powers of 1 sequence A000012 with itself. For the definition of half-convolution see a comment on A201204, where also the rule for the o.g.f. is given. - _Wolfdieter Lang_, Jan 09 2012

%C a(n) is also the number of roots of the n-th Bernoulli polynomial in the right half-plane for n>0. - _Michel Lagneau_, Nov 08 2012

%C a(n) is the number of symmetry-allowed, linearly-independent terms at n-th order in the series expansion of the Exe vibronic perturbation matrix, H(Q) (cf. Viel & Eisfeld). - _Bradley Klee_, Jul 21 2015

%C a(n) is the number of distinct integers in the n-th row of Pascal's triangle. - _Melvin Peralta_, Feb 03 2016

%C a(n+1) for n >= 3 is the diameter of the Generalized Petersen Graph G(n, 1). - _Nick Mayers_, Jun 06 2016

%C The arithmetic function v_1(n,2) as defined in A289198. - _Robert Price_, Aug 22 2017

%C Also, this sequence is the second column in the triangle of the coefficients of the sum of two consecutive Fibonacci polynomials F(n+1, x) and F(n, x) (n>=0) in ascending powers of x. - _Mohammad K. Azarian_, Jul 18 2018

%C a(n+2) is the least k such that given any k integers, there exist two of them whose sum or difference is divisible by n. - _Pablo Hueso Merino_, May 09 2020

%C Column k = 2 of A051159. - _John Keith_, Jun 28 2021

%D D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 100.

%D L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 109, Eq. [6c]; p. 116, P(n,2).

%D D. Parisse, 'The tower of Hanoi and the Stern-Brocot Array', Thesis, Munich 1997

%H Charles R Greathouse IV, <a href="/A008619/b008619.txt">Table of n, a(n) for n = 0..10000</a>

%H Andrei Asinowski, Cyril Banderier and Valerie Roitner, <a href="https://lipn.univ-paris13.fr/~banderier/Papers/several_patterns.pdf">Generating functions for lattice paths with several forbidden patterns</a>, (2019).

%H Peter J. Cameron, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/groups.html">Sequences realized by oligomorphic permutation groups</a>, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.

%H L. Colmenarejo, <a href="http://arxiv.org/abs/1604.00803">Combinatorics on several families of Kronecker coefficients related to plane partitions</a>, arXiv:1604.00803 [math.CO], 2016. See Table 1 p. 5.

%H Ricardo Gómez Aíza, <a href="https://arxiv.org/abs/2402.16111">Trees with flowers: A catalog of integer partition and integer composition trees with their asymptotic analysis</a>, arXiv:2402.16111 [math.CO], 2024. See p. 23.

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=120">Encyclopedia of Combinatorial Structures 120</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=209">Encyclopedia of Combinatorial Structures 209</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=351">Encyclopedia of Combinatorial Structures 351</a>

%H Gerzson Keri and Patric R. J. Östergård, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL9/Keri/keri6.html">The Number of Inequivalent (2R+3,7)R Optimal Covering Codes</a>, Journal of Integer Sequences, Vol. 9 (2006), Article 06.4.7.

%H L. F. Klosinski, G. L. Alexanderson and A. P. Hillman, <a href="http://www.jstor.org/stable/2322570">The William Lowell Putnam Mathematical Competition</a>, Amer. Math. Monthly 91 (1984), 487-495. See Problem B2.

%H Donatella Merlini and Massimo Nocentini, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Merlini/merlini5.html">Algebraic Generating Functions for Languages Avoiding Riordan Patterns</a>, Journal of Integer Sequences, Vol. 21 (2018), Article 18.1.3.

%H Narad Rampersad and Max Wiebe, <a href="https://arxiv.org/abs/2309.04012">Sums of products of binomial coefficients mod 2 and 2-regular sequences</a>, arXiv:2309.04012 [math.NT], 2023.

%H Bruce Reznick, <a href="http://dx.doi.org/10.1007/978-1-4612-3464-7_29">Some binary partition functions</a>, 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.

%H Alexandra Viel and Wolfgang Eisfeld, <a href="http://dx.doi.org/10.1063/1.1646371"> Effects of higher order Jahn-Teller coupling on the nuclear dynamics</a>, J. Chem. Phys., 120, 4603 (2004).

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Legendre-GaussQuadrature.html">Legendre-Gauss Quadrature</a>

%H <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>

%H <a href="/index/Par#partN">Index entries for related partition-counting sequences</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%H <a href="/index/Mo#Molien">Index entries for Molien series</a>

%F Euler transform of [1, 1].

%F a(n) = 1 + floor(n/2).

%F G.f.: 1/((1-x)(1-x^2)).

%F E.g.f.: ((3+2*x)*exp(x) + exp(-x))/4.

%F a(n) = a(n-1) + a(n-2) - a(n-3) = -a(-3-n).

%F a(0) = a(1) = 1 and a(n) = floor( (a(n-1) + a(n-2))/2 + 1 ).

%F a(n) = (2*n + 3 + (-1)^n)/4. - _Paul Barry_, May 27 2003

%F a(n) = Sum_{k=0..n} Sum_{j=0..k} Sum_{i=0..j} binomial(j, i)*(-2)^i. - _Paul Barry_, Aug 26 2003

%F E.g.f.: ((1+x)*exp(x) + cosh(x))/2. - _Paul Barry_, Sep 13 2003

%F a(n) = A108299(n-1,n)*(-1)^floor(n/2) for n > 0. - _Reinhard Zumkeller_, Jun 01 2005

%F a(n) = A108561(n+2,n) for n > 0. - _Reinhard Zumkeller_, Jun 10 2005

%F a(n) = A125291(A125293(n)) for n>0. - _Reinhard Zumkeller_, Nov 26 2006

%F a(n) = ceiling(n/2), n >= 1. - _Mohammad K. Azarian_, May 22 2007

%F 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

%F a(n) = A026820(n,2) for n > 1. - _Reinhard Zumkeller_, Jan 21 2010

%F a(n) = n - a(n-1) + 1 (with a(0)=1). - _Vincenzo Librandi_, Nov 19 2010

%F a(n) = A000217(n) / A110654(n). - _Reinhard Zumkeller_, Aug 24 2011

%F a(n+1) = A181971(n,n). - _Reinhard Zumkeller_, Jul 09 2012

%F 1/(1+2/(2+3/(3+4/(4+5/(5+...(continued fraction))))) = 1/(e-1), see A073333. - _Philippe Deléham_, Mar 09 2013

%F a(n) = floor(A000217(n)/n), n > 0. - _L. Edson Jeffery_, Jul 26 2013

%F 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

%F a(n) = (a(0) + a(1) + ... + a(n-1))/a(n-1), where a(0) = 1. - _Melvin Peralta_, Jun 16 2015

%F a(n) = Sum_{k=0..n} (-1)^(n-k) * (k+1). - _Rick L. Shepherd_, Sep 18 2020

%F a(n) = a(n-2) + 1 for n >= 2. - _Vladimír Modrák_, Sep 29 2020

%F a(n) = A004526(n)+1. - _Chai Wah Wu_, Jul 07 2022

%p a:= n-> iquo(n+2, 2): seq(a(n), n=0..75);

%t Flatten[Table[{n,n},{n,35}]] (* _Harvey P. Dale_, Sep 20 2011 *)

%t With[{c=Range[40]},Riffle[c,c]] (* _Harvey P. Dale_, Feb 23 2013 *)

%t CoefficientList[Series[1/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* _Robert G. Wilson v_, Feb 05 2015 *)

%t LinearRecurrence[{1, 1, -1}, {1, 1, 2}, 75] (* _Robert G. Wilson v_, Feb 05 2015 *)

%t Table[QBinomial[n, 2, -1], {n, 2, 75}] (* _John Keith_, Jun 28 2021 *)

%o (PARI) a(n)=n\2+1

%o (Haskell)

%o a008619 = (+ 1) . (`div` 2)

%o a008619_list = concatMap (\x -> [x,x]) [1..]

%o -- _Reinhard Zumkeller_, Apr 02 2012

%o (Sage)

%o 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

%o (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

%o (Scala) (2 to 99).map(_ / 2) // _Alonso del Arte_, May 09 2020

%o (Python)

%o def A008619(n): return (n>>1)+1 # _Chai Wah Wu_, Jul 07 2022

%Y Essentially same as A004526.

%Y Harmonic mean of a(n) and A056136 is n.

%Y Cf. A001057, A065033, A001399, A001400, A001401.

%Y a(n)=A010766(n+2, 2).

%Y Cf. A010551 (partial products).

%Y Cf. A263997 (a block spiral).

%Y Cf. A289187.

%Y Column 2 of A235791.

%K nonn,easy,nice

%O 0,3

%A _N. J. A. Sloane_

%E Additional remarks from _Daniele Parisse_

%E Edited by _N. J. A. Sloane_, Sep 06 2009

%E Partially edited by _Joerg Arndt_, Mar 11 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)