login
Follow n+1 by n. Also (essentially) Molien series of 2-dimensional quaternion group Q_8.
59

%I #119 Oct 08 2022 09:44:28

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

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

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

%N Follow n+1 by n. Also (essentially) Molien series of 2-dimensional quaternion group Q_8.

%C A two-way infinite sequences which is palindromic (up to sign). - _Michael Somos_, Mar 21 2003

%C Number of permutations of [n+1] avoiding the patterns 123, 132 and 231 and having exactly one fixed point. Example: a(0) because we have 1; a(2)=2 because we have 213 and 321; a(3)=1 because we have 3214. - _Emeric Deutsch_, Nov 17 2005

%C The ring of invariants for the standard action of Quaternions on C^2 is generated by x^4 + y^4, x^2 * y^2, and x * y * (x^4 - y^4). - _Michael Somos_, Mar 14 2011

%C A000027 and A001477 interleaved. - _Omar E. Pol_, Feb 06 2012

%C First differences are A168361, extended by an initial -1. (Or: a(n)-a(n-1) = A168361(n+1), for all n >= 1.) - _M. F. Hasler_, Oct 05 2017

%C Also the number of unlabeled simple graphs with n + 1 vertices and exactly n endpoints (vertices of degree 1). The labeled version is A327370. - _Gus Wiseman_, Sep 06 2019

%D D. Benson, Polynomial Invariants of Finite Groups, Cambridge, p. 23.

%D S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 15.

%D M. D. Neusel and L. Smith, Invariant Theory of Finite Groups, Amer. Math. Soc., 2002; see p. 97.

%D L. Smith, Polynomial Invariants of Finite Groups, A K Peters, 1995, p. 90.

%H Reinhard Zumkeller, <a href="/A028242/b028242.txt">Table of n, a(n) for n = 0..1000</a>

%H Paul Barry, <a href="https://arxiv.org/abs/2004.04577">On a Central Transform of Integer Sequences</a>, arXiv:2004.04577 [math.CO], 2020.

%H H. W. Gould, <a href="http://www.fq.math.ca/Papers1/44-4/quartgould04_2006.pdf">The inverse of a finite series and a third-order recurrent sequence</a>, Fibonacci Quart. 44 (2006), no. 4, 302-315. See page 311.

%H T. Mansour and A. Robertson, <a href="http://dx.doi.org/10.1007/s000260200013">Refined restricted permutations avoiding subsets of patterns of length three</a>, Annals of Combinatorics, 6, 2002, 407-418 (Theorem 3.3).

%H MathOverflow, <a href="http://mathoverflow.net/questions/58283/">A question about an application of Molien's formula to find the generators and relations of an invariant ring</a>.

%H Gus Wiseman, <a href="/A028242/a028242.png">The a(3) = 2 through a(7) = 4 graphs with exactly n - 1 endpoints</a>.

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

%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>.

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

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

%F Euler transform of length 6 sequence [0, 2, 1, 0, 0, -1]. - _Michael Somos_, Mar 14 2011

%F a(n) = n - a(n-1) [with a(0) = 1] = A000035(n-1) + A004526(n). - _Henry Bottomley_, Jul 25 2001

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

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

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

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

%F a(n) = 2*floor(n/2) - floor((n-1)/2). - _Wesley Ivan Hurt_, Oct 22 2013

%F a(n) = floor((n+1+(-1)^n)/2). - _Wesley Ivan Hurt_, Mar 15 2015

%F a(n) = (1 + 2n + 3(-1)^n)/4. - _Wesley Ivan Hurt_, Mar 18 2015

%F a(n) = Sum_{i=1..floor(n/2)} floor(n/(n-i)) for n > 0. - _Wesley Ivan Hurt_, May 21 2017

%F a(2n) = n+1, a(2n+1) = n, for all n >= 0. - _M. F. Hasler_, Oct 05 2017

%F a(n) = 3*floor(n/2) - n + 1. - _Pierre-Alain Sallard_, Dec 15 2018

%F E.g.f.: ((2 + x)*cosh(x) + (x - 1)*sinh(x))/2. - _Stefano Spezia_, Aug 01 2022

%F Sum_{n>=2} (-1)^(n+1)/a(n) = 1. - _Amiram Eldar_, Oct 04 2022

%e 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 + ...

%e 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 + ...

%p series((1+x^3)/(1-x^2)^2,x,80);

%p A028242:=n->floor((n+1+(-1)^n)/2): seq(A028242(n), n=0..100); # _Wesley Ivan Hurt_, Mar 17 2015

%t Table[(1 + 2 n + 3 (-1)^n)/4, {n, 0, 74}] (* or *)

%t LinearRecurrence[{1, 1, -1}, {1, 0, 2}, 75] (* or *)

%t CoefficientList[Series[(1 - x + x^2)/((1 - x) (1 - x^2)), {x, 0, 74}], x] (* _Michael De Vlieger_, May 21 2017 *)

%t Table[{n,n-1},{n,40}]//Flatten (* _Harvey P. Dale_, Jun 26 2017 *)

%t Table[3*floor(n/2)-n+1,{n,0,40}] (* _Pierre-Alain Sallard_, Dec 15 2018 *)

%o (PARI) {a(n) = (n\2) - (n%2) + 1} \\ _Michael Somos_, Oct 02 1999

%o (PARI) A028242(n)=n\2+!bittest(n,0) \\ _M. F. Hasler_, Oct 05 2017

%o (Magma) &cat[ [n+1, n]: n in [0..37] ]; // _Klaus Brockhaus_, Nov 23 2009

%o (Haskell)

%o import Data.List (transpose)

%o a028242 n = n' + 1 - m where (n',m) = divMod n 2

%o a028242_list = concat $ transpose [a000027_list, a001477_list]

%o -- _Reinhard Zumkeller_, Nov 27 2012

%o (GAP) a:=[1];; for n in [2..80] do a[n]:=(n-1)-a[n-1]; od; a; # _Muniru A Asiru_, Dec 16 2018

%o (Sage) s=((1+x^3)/(1-x^2)^2).series(x, 80); s.coefficients(x, sparse=False) # _G. C. Greubel_, Dec 16 2018

%Y Cf. A000124 (a=1, a=n+a), A028242 (a=1, a=n-a).

%Y Partial sums give A004652. A030451(n)=a(n+1), n>0.

%Y Cf. A052938 (same sequence except no leading 1,0,2).

%Y Cf. A000027, A001477.

%Y Column k = n - 1 of A327371.

%Y Cf. A000035, A004526, A004110, A059167, A109613, A110654, A110657, A110658, A110660, A168361, A245797, A327227, A327369, A327370, A327377.

%K nonn,easy,nice

%O 0,3

%A _N. J. A. Sloane_

%E First part of definition adjusted to match offset by _Klaus Brockhaus_, Nov 23 2009