login
a(n) = 2^(n+3) - 6*n - 7.
0

%I #53 Oct 13 2022 14:18:46

%S 1,3,13,39,97,219,469,975,1993,4035,8125,16311,32689,65451,130981,

%T 262047,524185,1048467,2097037,4194183,8388481,16777083,33554293,

%U 67108719,134217577,268435299,536870749,1073741655,2147483473,4294967115,8589934405,17179868991

%N a(n) = 2^(n+3) - 6*n - 7.

%C Companion to A247618 which has the same recurrence.

%C For this recurrence the main sequence is A000295.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,2).

%F a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).

%F a(n+1) = a(n-1) + 12*A000225(n). a(-1) = 3.

%F a(2*n) mod 9 = period 3: repeat [1, 4, 7].

%F a(2*n+1) mod 9 = 3.

%F a(n) mod 9 = period 6: repeat [1, 3, 4, 3, 7, 3].

%F 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].

%F a(n+1) - a(n) = 2^(n+3) - 6.

%F From _G. C. Greubel_, Nov 15 2018: (Start)

%F G.f.: (1-x+6*x^2)/((1-2*x)*(1-x)^2).

%F E.g.f.: 8*exp(2*x) - (7 + 6*x)*exp(x). (End)

%t a[n_]:=2^(n+3) - 6*n - 7; Array[a,32,0] (* _Amiram Eldar_, Nov 14 2018 *)

%o (PARI) vector(40, n, n--; 2^(n+3) -6*n -7) \\ _G. C. Greubel_, Nov 15 2018

%o (Magma) [2^(n+3) -6*n -7: n in [0..40]]; // _G. C. Greubel_, Nov 15 2018

%o (Sage) [2^(n+3) -6*n -7 for n in range(40)] # _G. C. Greubel_, Nov 15 2018

%o (GAP) List([0..40], n -> 2^(n+3) -6*n -7); # _G. C. Greubel_, Nov 15 2018

%Y Cf. A000225, A000295, A010701, A016921, A100402, A129756, A247618.

%K nonn,easy

%O 0,2

%A _Paul Curtz_, Nov 14 2018

%E More terms from _Amiram Eldar_, Nov 14 2018