login
A107732
Column 1 of the array in A107735.
3
1, 2, 5, 4, 21, 8, 85, 16, 341, 32, 1365, 64, 5461, 128, 21845, 256, 87381, 512, 349525, 1024, 1398101, 2048, 5592405, 4096, 22369621, 8192, 89478485, 16384, 357913941, 32768, 1431655765, 65536, 5726623061, 131072, 22906492245, 262144, 91625968981, 524288, 366503875925
OFFSET
3,2
REFERENCES
S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 483.
FORMULA
a(2*k+2) = 2^k = A000079(k), a(2*k+1) = (4^k-1)/3 = A002450(k) = A001045(2*k).
a(n) = 7*a(n-2) - 14*a(n-4) + 8*a(n-6) for n > 8. - Chai Wah Wu, Jun 19 2016
G.f.: x^3*(1 + 2*x - 2*x^2 - 10*x^3 + 8*x^5)/(1 - 7*x^2 + 14*x^4 - 8*x^6). - Chai Wah Wu, Jun 19 2016
a(n) = (3*(1 + (-1)^n)*2^(n/2) - (1 - (-1)^n)*(2 - 2^n))/12. - Colin Barker, Mar 26 2019
a(n) = (2^n - 2)/6 if n is odd else 2^(n/2 - 1). - Peter Luschny, Mar 26 2019
MATHEMATICA
Table[(3 (1 + (-1)^n) 2^(n/2) - (1 - (-1)^n) (2 - 2^n))/12, {n, 3, 50}] (* Bruno Berselli, Mar 26 2019 *)
PROG
(PARI) Vec(x^3*(1 + 2*x - 2*x^2 - 10*x^3 + 8*x^5) / ((1 - x)*(1 + x)*(1 - 2*x)*(1 + 2*x)*(1 - 2*x^2)) + O(x^40)) \\ Colin Barker, Mar 26 2019
(Sage)
def a(n): return (2^n-2)//6 if is_odd(n) else 2^(n//2-1))
print([a(n) for n in (3..41)]) # Peter Luschny, Mar 26 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 10 2005
EXTENSIONS
More terms from Chai Wah Wu, Jun 19 2016
STATUS
approved