OFFSET
0,2
COMMENTS
Sort the terms in increasing order and add 1 to get sequence A032769.
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
O.g.f.: x*(2 + 2*x + 2*x^2 - x^3)/((1 - x)^2*(1 + x + x^2 + x^3)).
E.g.f.: ((6 + 5*x)*sinh(x) + (3 + 5*x)*cosh(x) - 3*(sin(x) + cos(x)))/4.
a(n) = 1 + (10*n - 6*(-1)^((n-1)*n/2) - 3*(-1)^n + 1)/8.
a(4*k + r) = 5*k + 2*r, with r = 0, 1, 2 or 3.
a(n + 4*k) = a(n) + 5*k.
MATHEMATICA
Table[n + Floor[n/4] + Mod[n, 4], {n, 0, 80}]
PROG
(PARI) vector(80, n, n--; n + floor(n/4) + n%4)
(Sage) [n + floor(n/4) + n%4 for n in (0..80)]
(Maxima) makelist(n + floor(n/4) + mod(n, 4), n, 0, 80);
(Magma) [n + Floor(n/4) + (n mod 4): n in [0..80]];
(Python)
def A271324(n): return n+(n>>2)+(n&3) # Chai Wah Wu, Jan 29 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Apr 04 2016
STATUS
approved