OFFSET
1,2
COMMENTS
1 together with A004767. - Omar E. Pol, Feb 23 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
David Applegate, The movie version
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
a(1) = 1, a(n) = 4*n - 5 for n >= 2. - Jaroslav Krizek, Aug 15 2009
G.f.: x*(x+2*x^2+1)/(x-1)^2. - R. J. Mathar, Dec 08 2010
E.g.f.: exp(x)*(4*x - 5) + 5 + 2*x. - Stefano Spezia, Mar 21 2025
EXAMPLE
g.f. = x + 3*x^2 + 7*x^3 + 11*x^4 + 15*x^5 + 19*x^6 + 23*x^7 + 27*x^8 + ...
MATHEMATICA
CoefficientList[Series[(x + 2 x^2 + 1)/(x - 1)^2, {x, 0, 80}], x] (* Vincenzo Librandi, Feb 25 2014 *)
LinearRecurrence[{2, -1}, {1, 3, 7}, 70] (* Harvey P. Dale, Jan 03 2023 *)
PROG
(Magma) I:=[1, 3, 7]; [n le 3 select I[n] else 2*Self(n-1)-Self(n-2): n in [1..70]]; // Vincenzo Librandi, Feb 25 2014
(PARI) A131098(n)=abs(4*n-5) \\ M. F. Hasler, Apr 27 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hans Isdahl, Sep 24 2007
EXTENSIONS
Edited by N. J. A. Sloane, Jun 29 2009
STATUS
approved
