OFFSET
1,3
COMMENTS
This is a strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n, m)) for n, m >= 1. In particular, this is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Jul 06 2026
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,5,0,-4).
FORMULA
a(n) = M / gcd( M, 3 ), where M = 2^n - 1.
Conjectures from Colin Barker, Aug 23 2014, verified by Robert Israel, Apr 22 2016: (Start)
a(n) = (-1)*((-2+(-1)^n)*(-1+2^n))/3.
a(n) = 5*a(n-2) - 4*a(n-4).
G.f.: x*(2*x^2+x+1) / ((x-1)*(x+1)*(2*x-1)*(2*x+1)). (End)
E.g.f.: (-1 + exp(x) - 2*exp(3*x) + 2*exp(4*x))*exp(-2*x)/3. - Ilya Gutkovskiy, Apr 22 2016
a(n) = A051176(2^n - 1). - Peter Bala, Jul 06 2026
MAPLE
MATHEMATICA
Table[(2^n - 1)/GCD[2^n - 1, 3], {n, 50}] (* Vincenzo Librandi, Mar 16 2013 *)
(* Alternative: *)
LinearRecurrence[{0, 5, 0, -4}, {1, 1, 7, 5}, 40] (* Harvey P. Dale, Jan 05 2017 *)
PROG
(Magma) [(2^n - 1) / GCD (2^n - 1, 3): n in [1..40]]; // Vincenzo Librandi, Mar 16 2013
(PARI) a(n)=(2^n-1)/gcd(2^n-1, 3) \\ Edward Jiang, Sep 04 2014
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Joerg Arndt, Jun 07 2012
STATUS
approved
