OFFSET
0,2
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..1000 (terms a(0..999) from Gennady Eremin), May 03 2022
Index entries for linear recurrences with constant coefficients, signature (6,-13,12,-4).
FORMULA
Binomial transform of [1, 1, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, ...].
For n > 0, a(n) = (n+3)*2^(n-1) - n - 1. - R. J. Mathar, Apr 04 2012, edited by M. F. Hasler, Mar 29 2022
G.f.: (2*x^4-8*x^3+8*x^2-4*x+1)/((x-1)^2*(2*x-1)^2). - Colin Barker, Aug 13 2012
EXAMPLE
a(3) = 20 = sum of row 4 terms of triangle A134310: (4 + 4 + 5 + 7).
a(3) = 20 = (1, 3, 3, 1) dot (1, 1, 4, 4) = (1 + 3 + 12 + 4).
MATHEMATICA
Join[{1}, LinearRecurrence[{6, -13, 12, -4}, {2, 7, 20, 51}, 30]] (* Harvey P. Dale, Apr 16 2013 *)
PROG
(Python)
a = lambda n: (n+3)*2**(n-1)-n-1 if n > 0 else 1
print([a(n) for n in range(40)]) # Gennady Eremin, Mar 26 2022
(PARI) apply( {A134311(n)=max(n+3, 4)<<(n-1)-n-1}, [0..33]) \\ M. F. Hasler, Mar 29 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Oct 21 2007
EXTENSIONS
Offset corrected to 0 by M. F. Hasler, Mar 29 2022
STATUS
approved