OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A141310.
For n > 2, a(n-1) is the number of occurrences of n in A319840. - Stefano Spezia, Apr 07 2023
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
a(1) = 1, and for n > 1, if n is even, a(n) = 2, otherwise a(n) = (n+3)/2.
From Stefano Spezia, Apr 07 2023: (Start)
O.g.f.: x*(1 + 2*x + x^2 - 2*x^3 - x^4)/((1 - x)^2*(1 + x)^2).
E.g.f.: ((4 + x)*cosh(x) + 3*sinh(x) - 2*(2 + x))/2. (End)
PROG
(PARI) A319702(n) = if(n<=2, n, if(!(n%2), 2, (n+3)/2));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Oct 02 2018
STATUS
approved