OFFSET
0,2
COMMENTS
Sum of the numbers from 3*(n-1) to 3*(n+1). - Bruno Berselli, Oct 25 2018
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Tanya Khovanova, Recursive Sequences.
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 333.
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
G.f.: 21*x/(1-x)^2. - Vincenzo Librandi, Jun 10 2013
From Elmo R. Oliveira, Apr 08 2025: (Start)
E.g.f.: 21*x*exp(x).
MATHEMATICA
Range[0, 1500, 21] (* Vladimir Joseph Stephan Orlovsky, Jun 01 2011 *)
(* Alternative: *)
CoefficientList[Series[21 x/(1-x)^2, {x, 0, 60}], x] (* Vincenzo Librandi, Jun 10 2013 *)
(* Alternative: *)
NestList[21+#&, 0, 60] (* Harvey P. Dale, Jul 05 2026 *)
(* Alternative: *)
LinearRecurrence[{2, -1}, {0, 21}, 60] (* Harvey P. Dale, Jul 05 2026 *)
PROG
(PARI) a(n)=21*n \\ Charles R Greathouse IV, Oct 07 2015
(Magma) A008603:= func< n | 21*n >; // G. C. Greubel, Apr 16 2025
(Python) def A008603(n): return 21*n # G. C. Greubel, Apr 16 2025
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
STATUS
approved
