login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A282732
Satisfies the recurrence a(n) = 3*a(n-1)-a(n-2)+a(n-3)-2*a(n-4)+2*a(n-5).
1
1, 3, 9, 23, 63, 171, 461, 1247, 3371, 9111, 24629, 66575, 179959, 486451, 1314933, 3554415, 9607995, 25971519, 70204013, 189769551, 512968999, 1386614411, 3748178797, 10131759903, 27387316427, 74031077351, 200114546757, 540932717135, 1462203568951, 3952505014627, 10684077253253, 28880293973327
OFFSET
0,2
LINKS
Julien Leroy, Michel Rigo, and Manon Stipulanti, Behavior of Digital Sequences Through Exotic Numeration Systems, Electronic Journal of Combinatorics 24(1) (2017), #P1.44. See Section 4.
FORMULA
G.f.: (1 + x^2 - 2*x^3 + 2*x^4) / (1 - 3*x + x^2 - x^3 + 2*x^4 - 2*x^5). - Colin Barker, Mar 04 2017
MAPLE
a:=proc(n) option remember;
if n=0 then 1
elif n=1 then 3
elif n=2 then 9
elif n=3 then 23
elif n=4 then 63
else 3*a(n-1)-a(n-2)+a(n-3)-2*a(n-4)+2*a(n-5);
fi;
end;
[seq(a(n), n=0..40)];
MATHEMATICA
LinearRecurrence[{3, -1, 1, -2, 2}, {1, 3, 9, 23, 63}, 40] (* Harvey P. Dale, Jun 06 2020 *)
PROG
(PARI) Vec((1 + x^2 - 2*x^3 + 2*x^4) / (1 - 3*x + x^2 - x^3 + 2*x^4 - 2*x^5) + O(x^40)) \\ Colin Barker, Mar 04 2017
CROSSREFS
Sequence in context: A029852 A354645 A371956 * A253244 A018044 A047045
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 03 2017
STATUS
approved