OFFSET
1,1
COMMENTS
Solutions to 3^x - 2^x == 5 (mod 7). - Cino Hilliard, May 09 2003
REFERENCES
Emil Grosswald, Topics From the Theory of Numbers, 1966, p. 65, problem 23.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 6*n - 7 - a(n-1), with a(1)=2. - Vincenzo Librandi, Aug 05 2010
G.f.: x*(2+x+3*x^2) / ( (1+x)*(1-x)^2 ). - R. J. Mathar, Oct 08 2011
From Guenther Schrack, Jun 21 2019: (Start)
a(n) = a(n-2) + 6 with a(1)=2, a(2)=3 for n > 2;
a(n) = 3*n - 2 - (-1)^n. (End)
E.g.f.: 3 - 3*(1-x)*cosh(x) - (1-3*x)*sinh(x). - G. C. Greubel, Jun 30 2019
E.g.f.: 3 + (3*x-3)*exp(x) + 2*sinh(x). - David Lovler, Jul 16 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(12*sqrt(3)) + log(3)/4 - log(2)/3. - Amiram Eldar, Dec 13 2021
MATHEMATICA
Select[Range[0, 210], MemberQ[{2, 3}, Mod[#, 6]] &] (* or *)
Fold[Append[#1, 6 #2 - Last@ #1 - 7] &, {2}, Range[2, 70]] (* or *)
Rest@ CoefficientList[Series[x(2+x+3x^2)/((1+x)(1-x)^2), {x, 0, 70}], x] (* Michael De Vlieger, Jan 12 2018 *)
PROG
(PARI) vector(70, n, 3*n-2-(-1)^n) \\ G. C. Greubel, Jun 30 2019
(Magma) [3*n-2-(-1)^n: n in [1..70]]; // G. C. Greubel, Jun 30 2019
(Sage) [3*n-2-(-1)^n for n in (1..70)] # G. C. Greubel, Jun 30 2019
(GAP) List([1..70], n-> 3*n-2-(-1)^n) # G. C. Greubel, Jun 30 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Cino Hilliard, May 09 2003
STATUS
approved