A028242 Follow n+1 by n. Also (essentially) Molien series of 2-dimensional quaternion group Q_8.
1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15, 14, 16, 15, 17, 16, 18, 17, 19, 18, 20, 19, 21, 20, 22, 21, 23, 22, 24, 23, 25, 24, 26, 25, 27, 26, 28, 27, 29, 28, 30, 29, 31, 30, 32, 31, 33, 32, 34, 33, 35, 34, 36, 35, 37, 36, 38
Offset: 0
Examples
G.f. = 1 + 2*x^2 + x^3 + 3*x^4 + 2*x^5 + 4*x^6 + 3*x^7 + 5*x^8 + 4*x^9 + 6*x^10 + 5*x^11 + ... Molien g.f. = 1 + 2*t^4 + t^6 + 3*t^8 + 2*t^10 + 4*t^12 + 3*t^14 + 5*t^16 + 4*t^18 + 6*t^20 + ...
References
- D. Benson, Polynomial Invariants of Finite Groups, Cambridge, p. 23.
- S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 15.
- M. D. Neusel and L. Smith, Invariant Theory of Finite Groups, Amer. Math. Soc., 2002; see p. 97.
- L. Smith, Polynomial Invariants of Finite Groups, A K Peters, 1995, p. 90.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Paul Barry, On a Central Transform of Integer Sequences, arXiv:2004.04577 [math.CO], 2020.
- H. W. Gould, The inverse of a finite series and a third-order recurrent sequence, Fibonacci Quart. 44 (2006), no. 4, 302-315. See page 311.
- T. Mansour and A. Robertson, Refined restricted permutations avoiding subsets of patterns of length three, Annals of Combinatorics, 6, 2002, 407-418 (Theorem 3.3).
- MathOverflow, A question about an application of Molien's formula to find the generators and relations of an invariant ring.
- Gus Wiseman, The a(3) = 2 through a(7) = 4 graphs with exactly n - 1 endpoints.
- Index entries for Molien series.
- Index entries for two-way infinite sequences.
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
GAP
a:=[1];; for n in [2..80] do a[n]:=(n-1)-a[n-1]; od; a; # Muniru A Asiru, Dec 16 2018
-
Haskell
import Data.List (transpose) a028242 n = n' + 1 - m where (n',m) = divMod n 2 a028242_list = concat $ transpose [a000027_list, a001477_list] -- Reinhard Zumkeller, Nov 27 2012
-
Magma
&cat[ [n+1, n]: n in [0..37] ]; // Klaus Brockhaus, Nov 23 2009
-
Maple
series((1+x^3)/(1-x^2)^2,x,80); A028242:=n->floor((n+1+(-1)^n)/2): seq(A028242(n), n=0..100); # Wesley Ivan Hurt, Mar 17 2015
-
Mathematica
Table[(1 + 2 n + 3 (-1)^n)/4, {n, 0, 74}] (* or *) LinearRecurrence[{1, 1, -1}, {1, 0, 2}, 75] (* or *) CoefficientList[Series[(1 - x + x^2)/((1 - x) (1 - x^2)), {x, 0, 74}], x] (* Michael De Vlieger, May 21 2017 *) Table[{n,n-1},{n,40}]//Flatten (* Harvey P. Dale, Jun 26 2017 *) Table[3*floor(n/2)-n+1,{n,0,40}] (* Pierre-Alain Sallard, Dec 15 2018 *)
-
PARI
{a(n) = (n\2) - (n%2) + 1} \\ Michael Somos, Oct 02 1999
-
PARI
A028242(n)=n\2+!bittest(n,0) \\ M. F. Hasler, Oct 05 2017
-
Sage
s=((1+x^3)/(1-x^2)^2).series(x, 80); s.coefficients(x, sparse=False) # G. C. Greubel, Dec 16 2018
Formula
Expansion of the Molien series for standard action of Quaternions on C^2: (1 + t^6) / (1 - t^4)^2 = (1 - t^12) / ((1 - t^4)^2 * (1 - t^6)) in powers of t^2.
Euler transform of length 6 sequence [0, 2, 1, 0, 0, -1]. - Michael Somos, Mar 14 2011
G.f.: (1 - x + x^2) / ((1 - x) * (1 - x^2)) = ( 1+x^2-x ) / ( (1+x)*(x-1)^2 ).
a(2*n) = n + 1, a(2*n + 1) = n, a(-1 - n) = -a(n).
a(n) = a(n - 1) + a(n - 2) - a(n - 3).
a(n) = floor(n/2) + 1 - n mod 2. a(2*k) = k+1, a(2*k+1) = k; A110657(n) = a(a(n)), A110658(n) = a(a(a(n))); a(n) = A109613(n)-A110654(n) = A110660(n)/A110654(n). - Reinhard Zumkeller, Aug 05 2005
a(n) = 2*floor(n/2) - floor((n-1)/2). - Wesley Ivan Hurt, Oct 22 2013
a(n) = floor((n+1+(-1)^n)/2). - Wesley Ivan Hurt, Mar 15 2015
a(n) = (1 + 2n + 3(-1)^n)/4. - Wesley Ivan Hurt, Mar 18 2015
a(n) = Sum_{i=1..floor(n/2)} floor(n/(n-i)) for n > 0. - Wesley Ivan Hurt, May 21 2017
a(2n) = n+1, a(2n+1) = n, for all n >= 0. - M. F. Hasler, Oct 05 2017
a(n) = 3*floor(n/2) - n + 1. - Pierre-Alain Sallard, Dec 15 2018
E.g.f.: ((2 + x)*cosh(x) + (x - 1)*sinh(x))/2. - Stefano Spezia, Aug 01 2022
Sum_{n>=2} (-1)^(n+1)/a(n) = 1. - Amiram Eldar, Oct 04 2022
Extensions
First part of definition adjusted to match offset by Klaus Brockhaus, Nov 23 2009
Comments