OFFSET
0,2
COMMENTS
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
From Chai Wah Wu, May 18 2017: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) for n > 4.
G.f.: (4*x^4 - 5*x^3 - x + 1)/((x - 1)*(2*x - 1)). (End)
E.g.f.: (4*x^2 + 2*x + exp(x)*(exp(x) + 4) - 1)/4. - Stefano Spezia, Jul 03 2024
MATHEMATICA
Join[{1, 2, 4}, 2^Range[50] + 1] (* or *)
LinearRecurrence[{3, -2}, {1, 2, 4, 3, 5}, 50] (* Paolo Xausa, Jul 02 2024 *)
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a240277 = (+ 1) . fromJust . (`elemIndex` a007456_list)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Apr 03 2014
STATUS
approved