OFFSET
0,2
COMMENTS
a(n) mod 9 = period 2: repeat [1, 7].
The last digit from 7 is of period 4: repeat [7, 0, 5, 6].
The bisection A096045 = 1, 10, 46, ... is based on Bernoulli numbers.
a(n) is a companion to A051049(n).
With an initial 0, A051049(n) is an autosequence of the first kind.
With an initial 2, this sequence is an autosequence of the second kind.
See the reference.
Difference table:
1, 7, 10, 25, 46, 97, ... = this sequence.
6, 3, 15, 21, 51, 93, ... = 3*A014551(n)
-3, 12, 6, 30, 42, 102, ... = -3 followed by 6*A014551(n).
The main diagonal of the difference table gives A003945: 1, 3, 6, 12, 24, ...
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-2).
FORMULA
a(2n) = 3*4^n - 2, a(2n+1) = 6*4^n + 1.
a(n+2) = a(n) + 9*2^n, a(0) = 1, a(1) = 7.
From Colin Barker, Dec 28 2016: (Start)
a(n) = 3*2^n - 2 for n even.
a(n) = 3*2^n + 1 for n odd.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n>2.
G.f.: (1 + 5*x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)).
(End)
EXAMPLE
a(0) = 1, a(1) = 2*1 + 5 = 7, a(2) = 2*7 - 4 = 10, a(3) = 2*10 + 5 = 25.
MAPLE
seq(3*2^n-(-1)^n*(1+irem(n+1, 2)), n=0..32); # Peter Luschny, Dec 29 2016
MATHEMATICA
LinearRecurrence[{2, 1, -2}, {1, 7, 10}, 50] (* Paolo Xausa, Nov 13 2023 *)
PROG
(PARI) Vec((1 + 5*x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Dec 28 2016
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Paul Curtz, Dec 28 2016
STATUS
approved