%I #29 Dec 07 2019 12:18:24
%S 2,1,13,19,97,211,793,2059,6817,19171,60073,175099,535537,1586131,
%T 4799353,14316139,43112257,129009091,387682633,1161737179,3487832977,
%U 10458256051,31385253913,94134790219,282446313697,847255055011
%N G.f.: (2-x)/((1+2x)(1-3x)); e.g.f.: exp(3x)+exp(-2x); a(n)=3^n+(-2)^n.
%C Generalized Lucas-Jacobsthal numbers.
%C Pisano period lengths: 1, 1, 1, 2, 4, 1, 6, 2, 3, 4, 5, 2, 12, 6, 4, 4, 16, 3, 18, 4,... - _R. J. Mathar_, Aug 10 2012
%H Drexel University, <a href="http://mathforum.org/pcmi/hstp/sum2003/morning/day13.pdf">Generation X and Y</a>
%H G. Everest, Y. Puri and T. Ward, <a href="http://arXiv.org/abs/math.NT/0204173">Integer sequences counting periodic points</a>, arXiv:math/0204173 [math.NT], 2002.
%H OEIS Wiki, <a href="https://oeis.org/wiki/Autosequence">Autosequence</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,6)
%F a(0) = 2, a(1) = 1, a(n) = a(n-1)+6a(n-2).
%F a(n) = 3^n + (-2)^n. [_Gary Detlefs_, Dec 20 2009]
%F The sequence 1, 13, 19... is a(n+1) = 3*3^n-2*(-2)^n.
%F exp( Sum_{n >= 1} a(n)*x^n/n ) = Sum_{n >= 0} A015441(n+1)*x^n. - _Peter Bala_, Mar 30 2015
%F a(n) = 2*A015441(n+1) - A015441(n), a formula given by _Paul Curtz_ for autosequences of the 2nd kind. - _Jean-François Alcover_, Jun 02 2017
%p for i from 0 to 20 do print(3^i+(-2)^i) od; # _Gary Detlefs_, Dec 20 2009
%t a[0] = 2; a[1] = 1; a[n_] := a[n] = a[n - 1] + 6a[n - 2]; a /@ Range[0, 25] (* _Robert G. Wilson v_, Feb 02 2006 *)
%o (Sage) [lucas_number2(n,1,-6) for n in range(0, 26)] # _Zerinvary Lajos_, Apr 30 2009
%Y Cf. A014551, A087452, A015441.
%K easy,nonn
%O 0,1
%A _Paul Barry_, Sep 06 2003