OFFSET
0,2
COMMENTS
The first 2n terms are the divisors of 2 * 7^(n - 1). - Alonso del Arte, Jul 14 2016
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,7).
FORMULA
a(n) = 7^(n/2)*(7*(1+(-1)^n) + 2*sqrt(7)*(1-(-1)^n))/14.
From R. J. Mathar, Jun 18 2008: (Start)
O.g.f.: (1 + 2*x)/(1 - 7*x^2).
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
E.g.f.: cosh(sqrt(7)*x) + 2*sinh(sqrt(7)*x)/sqrt(7). - G. C. Greubel, Aug 10 2019
MAPLE
a[0]:=1: a[1]:=2: for n from 2 to 30 do a[n]:=7*a[n-2] od: seq(a[n], n=0..30);
MATHEMATICA
LinearRecurrence[{0, 7}, {1, 2}, 30] (* Harvey P. Dale, Mar 21 2013 *)
halfMax = 13; Divisors[2 * 7^halfMax] (* Alonso del Arte, Jul 18 2016 *)
PROG
(Magma) [n le 2 select n else 7*Self(n-2): n in [1..30]]; //Vincenzo Librandi, Jul 25 2016
(PARI) a(n)=if(n%2, 2, 1)*7^(n\2) \\ Charles R Greathouse IV, Jul 25 2016
(Sage) [7^(n/2)*(7*(1+(-1)^n) + 2*sqrt(7)*(1-(-1)^n))/14 for n in (0..30)] # G. C. Greubel, Aug 10 2019
(GAP) a:=[1, 2];; for n in [3..30] do a[n]:=7*a[n-2]; od; a; # G. C. Greubel, Aug 10 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula and Gary W. Adamson, Nov 15 2006
EXTENSIONS
Edited by N. J. A. Sloane, Nov 29 2006
STATUS
approved