The OEIS is supported by the many generous donors to the OEIS Foundation.

An oscillating sequence: a(n) = n^2 + 2^(n-1) - 2*a(n-1), n>0, with a(1) = 1.

2

`%I #37 Feb 09 2024 17:21:08
`

`%S 1,4,5,14,13,42,29,134,69,474,197,1798,669,7050,2509,28006,9813,
`

`%T 111770,38965,446758,155501,1786634,621565,7146054,2485733,28583642,
`

`%U 9942309,114333894,39768509,457334794,159073197,1829338278
`

`%N An oscillating sequence: a(n) = n^2 + 2^(n-1) - 2*a(n-1), n>0, with a(1) = 1.
`

`%C For large n: a(2n)/a(2n-1) -> 23/2; a(2n+1)/a(2n) -> 8/23.
`

`%C Related oscillating sequences can be formed by changing the offset of the exponent in the second term on the right-hand side of the definition (i.e., the power of 2) from (n-1) to n, (n+1), (n+2,) etc. In all such cases the values of a(2n-1) stays constant: 1, 5, 13, 29, 69, 197, 669, ... which is also given as A239367.
`

`%C For large n, this and the related sequences all obey a(n)/a(n-2) -> 4, as the second term is dominant.
`

`%H Richard R. Forberg, <a href="/A238315/b238315.txt">Table of n, a(n) for n = 1..32</a>
`

`%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,1,-11,12,-4).
`

`%F G.f.: -x*(2*x^4-6*x^3+8*x^2-x-1) / ((x-1)^3*(2*x-1)*(2*x+1)). - _Colin Barker_, Mar 31 2014
`

`%o (PARI) Vec(-x*(2*x^4-6*x^3+8*x^2-x-1)/((x-1)^3*(2*x-1)*(2*x+1)) + O(x^100)) \\ _Colin Barker_, Mar 31 2014
`

`%Y Cf. A239367.
`

`%K nonn,easy
`

`%O 1,2
`

`%A _Richard R. Forberg_, Mar 30 2014
`