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
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
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.
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
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
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);
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
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
First part of definition adjusted to match offset by Klaus Brockhaus, Nov 23 2009
STATUS
approved