login
A167205
a(n) = (3^n+1)/(3-(-1)^n).
1
1, 1, 5, 7, 41, 61, 365, 547, 3281, 4921, 29525, 44287, 265721, 398581, 2391485, 3587227, 21523361, 32285041, 193710245, 290565367, 1743392201, 2615088301, 15690529805, 23535794707, 141214768241, 211822152361, 1270932914165
OFFSET
0,3
COMMENTS
This sequence is (3^n + 1) divided by the highest possible power of 2, which is 4 for odd n and 2 for even n. It is never divisible by 8 or any higher power of 2, which implies Levi ben Gerson's observation that (3^n + 1 = 2^k) has no solution for n > 1. Cf. the comments and links to A235365. - Joe Slater, Apr 02 2017
FORMULA
a(n) = 10*a(n-2) - 9*a(n-4).
G.f.: (1 + x - 5*x^2 - 3*x^3)/((1+x)*(1-x)*(1+3*x)*(1-3*x)).
a(n) = numerator((1/4)^n + (3/4)^n), n > 0.
MAPLE
a:=n->(3^n+1)/(3-(-1)^n): seq(a(n), n=0..27); # Muniru A Asiru, Mar 05 2018
MATHEMATICA
CoefficientList[Series[(1+x-5x^2-3x^3)/((1+x)(1-x)(1+3x)(1-3x)), {x, 0, 30}], x] (* or *) LinearRecurrence[{0, 10, 0, -9}, {1, 1, 5, 7}, 30] (* Harvey P. Dale, Apr 25 2011 *)
PROG
(PARI) a(n) = (3^n+1)/(3-(-1)^n); \\ Altug Alkan, Mar 05 2018
(GAP) List([0..27], n->(3^n+1)/(3-(-1)^n)); # Muniru A Asiru, Mar 05 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jaume Oliver Lafont, Oct 30 2009
STATUS
approved