login
A320661
a(n) = 2^(n+3) - 6*n - 7.
0
1, 3, 13, 39, 97, 219, 469, 975, 1993, 4035, 8125, 16311, 32689, 65451, 130981, 262047, 524185, 1048467, 2097037, 4194183, 8388481, 16777083, 33554293, 67108719, 134217577, 268435299, 536870749, 1073741655, 2147483473, 4294967115, 8589934405, 17179868991
OFFSET
0,2
COMMENTS
Companion to A247618 which has the same recurrence.
For this recurrence the main sequence is A000295.
FORMULA
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
a(n+1) = a(n-1) + 12*A000225(n). a(-1) = 3.
a(2*n) mod 9 = period 3: repeat [1, 4, 7].
a(2*n+1) mod 9 = 3.
a(n) mod 9 = period 6: repeat [1, 3, 4, 3, 7, 3].
a(n) mod 10 = period 20: repeat [1, 3, 3, 9, 7, 9, 9, 5, 3, 5, 5, 1, 9, 1, 1, 7, 5, 7, 7, 3] = Im(n). Im(n-1) = [3, 1, 3, 3, 9, 7, 9, 9, 5, 3, 5, 5, 1, 9, 1, 1, 7, 5, 7, 7]. Disordered [1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9].
a(n+1) - a(n) = 2^(n+3) - 6.
From G. C. Greubel, Nov 15 2018: (Start)
G.f.: (1-x+6*x^2)/((1-2*x)*(1-x)^2).
E.g.f.: 8*exp(2*x) - (7 + 6*x)*exp(x). (End)
MATHEMATICA
a[n_]:=2^(n+3) - 6*n - 7; Array[a, 32, 0] (* Amiram Eldar, Nov 14 2018 *)
PROG
(PARI) vector(40, n, n--; 2^(n+3) -6*n -7) \\ G. C. Greubel, Nov 15 2018
(Magma) [2^(n+3) -6*n -7: n in [0..40]]; // G. C. Greubel, Nov 15 2018
(Sage) [2^(n+3) -6*n -7 for n in range(40)] # G. C. Greubel, Nov 15 2018
(GAP) List([0..40], n -> 2^(n+3) -6*n -7); # G. C. Greubel, Nov 15 2018
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 14 2018
EXTENSIONS
More terms from Amiram Eldar, Nov 14 2018
STATUS
approved