OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Stoehr Sequence.
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
Terms are 2^(n-1) up to a(6) and then 31n-154.
a(n) = 31*n-154 for n>5. a(n) = 2*a(n-1)-a(n-2) for n>7. G.f.: x*(15*x^6+8*x^5+4*x^4+2*x^3+x^2+1)/(x-1)^2. - Colin Barker, Sep 19 2012
MATHEMATICA
Join[{1, 2, 4, 8, 16, 32}, Range[63, 2000, 31]] (* Vladimir Joseph Stephan Orlovsky, Jun 15 2011 *)
LinearRecurrence[{2, -1}, {1, 2, 4, 8, 16, 32, 63}, 60] (* Harvey P. Dale, Sep 14 2015 *)
PROG
(PARI) a(n)=if(n>6, 31*n-154, 2^(n-1)) \\ Charles R Greathouse IV, Jun 20 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Corrected by Henry Bottomley, May 29 2001
STATUS
approved