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!)
A028242 Follow n+1 by n. Also (essentially) Molien series of 2-dimensional quaternion group Q_8. 55
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
A two-way infinite sequences which is palindromic (up to sign). - Michael Somos, Mar 21 2003
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
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
A000027 and A001477 interleaved. - Omar E. Pol, Feb 06 2012
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
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
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
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).
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
a(n) = n - a(n-1) [with a(0) = 1] = A000035(n-1) + A004526(n). - Henry Bottomley, Jul 25 2001
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
EXAMPLE
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 + ...
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 *)
PROG
(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
(Magma) &cat[ [n+1, n]: n in [0..37] ]; // Klaus Brockhaus, Nov 23 2009
(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
(GAP) a:=[1];; for n in [2..80] do a[n]:=(n-1)-a[n-1]; od; a; # Muniru A Asiru, Dec 16 2018
(Sage) s=((1+x^3)/(1-x^2)^2).series(x, 80); s.coefficients(x, sparse=False) # G. C. Greubel, Dec 16 2018
CROSSREFS
Cf. A000124 (a=1, a=n+a), A028242 (a=1, a=n-a).
Partial sums give A004652. A030451(n)=a(n+1), n>0.
Cf. A052938 (same sequence except no leading 1,0,2).
Column k = n - 1 of A327371.
Sequence in context: A289436 A282745 A097140 * A030451 A241825 A029162
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
First part of definition adjusted to match offset by Klaus Brockhaus, Nov 23 2009
STATUS
approved

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 29 03:15 EDT 2024. Contains 372097 sequences. (Running on oeis4.)