OFFSET
1,3
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Kai Williams, Number of monomials in a_n = a_{n-1} + (a_{n-2})^2 with a_1 = a, a_2 = b, Math StackExchange question 2363374, Jul 18 2017.
Index entries for linear recurrences with constant coefficients, signature (2,2,-4).
FORMULA
G.f.: (x - x^2 - 2*x^3 + x^4 - x^5) / ((1 - 2*x) * (1 - 2*x^2)).
0 = 4*a(n) - 2*a(n+1) - 2*a(n+2) + 1*a(n+3) for n>=3.
From Colin Barker, Jul 22 2017: (Start)
a(n) = 2^(n/2-1) + 2^(n-4) for n>2 and even.
a(n) = 3*2^((n-5)/2) + 2^(n-4) for n>2 and odd.
(End)
Given the sequence c(n, x, y), then the coefficients of: (1) c(n+2, sqrt(t), 0), (2) c(n+1, 0, t), and (3) c(n, t, t), each form the triangular sequence A103484. - Michael Somos, Jul 24 2017
EXAMPLE
G.f. = x + x^2 + 2*x^3 + 3*x^4 + 5*x^5 + 8*x^6 + 14*x^7 + 24*x^8 + 44*x^9 + ...
c(3) = x^2 + y so a(3) = 2, c(4) = x^2 + (y + y^2) so a(4) = 3, c(5) = x^4 + x^2(2*y) + (y + 2*y^2) so a(5) = 5.
MATHEMATICA
nn:=36; nn:=10; Rest[CoefficientList[Series[(x - x^2 - 2*x^3 + x^4 - x^5) / ((1 - 2*x) * (1 - 2*x^2)), {x, 0, nn}], x]] (* Georg Fischer, May 10 2020 *)
PROG
(PARI) {a(n) = if( n<3, n>0, my(e=n%2, m=2^((n+e)/2-2)); m * (m+2+e) / (1+e))};
(PARI) Vec(x*(1 - x - 2*x^2 + x^3 - x^4) / ((1 - 2*x)*(1 - 2*x^2)) + O(x^50)) \\ Colin Barker, Jul 22 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Jul 19 2017
STATUS
approved