OFFSET
0,1
COMMENTS
Although the OEIS indexes sequences by consecutive integers, it is better to think of this sequence as defined on the odd numbers 1,3,5,7,... and given by f(4m+1)=12m+3, f(4m+3)=2m+1, that is, subtract 1 and divide by 2 if the result is odd, otherwise multiply by 3. This arises in analyzing A109732.
It is conjectured that starting with any positive odd number d and iterating f, we always eventually reach either 1, 9, or 33 (see Comments in A135730).
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
From Colin Barker, Sep 13 2015: (Start)
a(n) = (3+3*(-1)^n+7*n+5*(-1)^n*n)/2.
a(n) = 2*a(n-2) - a(n-4) for n>3.
G.f.: (x^3+9*x^2+x+3) / ((x-1)^2*(x+1)^2).
(End)
MATHEMATICA
Table[If[EvenQ[n], 6n+3, n], {n, 0, 60}] (* or *) LinearRecurrence[{0, 2, 0, -1}, {3, 1, 15, 3}, 70] (* Harvey P. Dale, Dec 30 2023 *)
PROG
(PARI) Vec((x^3+9*x^2+x+3)/((x-1)^2*(x+1)^2) + O(x^100)) \\ Colin Barker, Sep 13 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Sep 02 2015
STATUS
approved