login
A232896
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4), where a(1) = 1, a(2) = 3, a(3) = 5, a(4) = 8.
5
1, 3, 5, 8, 12, 18, 27, 41, 63, 98, 154, 244, 389, 623, 1001, 1612, 2600, 4198, 6783, 10965, 17731, 28678, 46390, 75048, 121417, 196443, 317837, 514256, 832068, 1346298, 2178339, 3524609, 5702919, 9227498, 14930386, 24157852, 39088205, 63246023, 102334193
OFFSET
1,2
COMMENTS
Conjecture: a(n) is the position of 2*n-1, for n >= 1, in the sequence S = A232895 of positive integers generated by these rules: 1 and 2 are in S; if x is in S then x + 2 and 2*x are in S, where duplicates are deleted as they occur.
FORMULA
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4), where a(1) = 1, a(2) = 3, a(3) = 5, a(4) = 8.
a(n) = n-1 + A000045(n+1). - Tom Edgar, Mar 09 2015
G.f.: x*(1-2*x^2)/((1-x)^2*(1-x-x^2)). - Vincenzo Librandi, Mar 18 2015
a(n) = -1 + (2^(-1-n)*(-(1-sqrt(5))^(1+n) + (1+sqrt(5))^(1+n))) / sqrt(5) + n. - Colin Barker, Mar 11 2017
a(n) = Sum_{k=1..n} A001611(k-1). - Ehren Metcalfe, Apr 15 2019
EXAMPLE
a(5) = 3*a(4) - 2*a(3) - a(4) + a(5) = 3*8 - 2*5 - 3 + 1 = 12.
MATHEMATICA
a[1] = 1; a[2] = 3; a[3] = 5; a[4] = 8; a[n_] := a[n] = 3*a[n - 1] - 2*a[n - 2] - a[n - 3] + a[n - 4]; t = Table[a[n], {n, 1, 100}]
CoefficientList[Series[(1 - 2 x^2) / ((1 - x)^2 (1 - x - x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 18 2015 *)
LinearRecurrence[{3, -2, -1, 1}, {1, 3, 5, 8}, 39] (* Robert G. Wilson v, Jul 23 2018 *)
PROG
(Magma) I:=[1, 3, 5, 8]; [n le 4 select I[n] else 3*Self(n-1)-2*Self(n-2)-Self(n-3)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Mar 18 2015
(PARI) Vec(x*(1-2*x^2)/((1-x)^2*(1-x-x^2)) + O(x^50)) \\ Michel Marcus, Mar 18 2015
CROSSREFS
Cf. A232895.
Sequence in context: A001973 A248374 A020745 * A227635 A295058 A004398
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Dec 02 2013
STATUS
approved