A165355 a(n) = 3n + 1 if n is even, or a(n) = (3n + 1)/2 if n is odd.
1, 2, 7, 5, 13, 8, 19, 11, 25, 14, 31, 17, 37, 20, 43, 23, 49, 26, 55, 29, 61, 32, 67, 35, 73, 38, 79, 41, 85, 44, 91, 47, 97, 50, 103, 53, 109, 56, 115, 59, 121, 62, 127, 65, 133, 68, 139, 71, 145, 74, 151, 77, 157, 80, 163, 83, 169, 86, 175, 89, 181, 92, 187, 95, 193, 98
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- D. H. Lehmer, Continued fractions containing arithmetic progressions, Scripta Mathematica, 29 (1973): 17-24. [Annotated copy of offprint]
- Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
Programs
-
Mathematica
f[n_] := If[ OddQ@ n, (3n +1)/2, (3n +1)]; Array[f, 66, 0] (* Robert G. Wilson v, Jan 26 2015 *) f[n_] := (3 (-1)^(2n) + (-1)^(1 + n)) (-2 + 3n)/4; Array[f, 66] (* or *) CoefficientList[ Series[(x^3 + 5x^2 + 2x + 1)/(x^2 - 1)^2, {x, 0, 65}], x] (* or *) LinearRecurrence[{0, 2, 0, -1}, {1, 2, 7, 5}, 66] (* Robert G. Wilson v, Apr 13 2017 *)
-
PARI
a(n)=n+=2*n+1; if(n%2,n,n/2) \\ Charles R Greathouse IV, Jan 13 2015
Formula
a(n) = A026741(3*n+1).
G.f.: (1+2*x+5*x^2+x^3)/((x-1)^2 * (1+x)^2). - R. J. Mathar, Sep 26 2009
a(n) = (3+9*n)/4 + (-1)^n*(1+3*n)/4. - R. J. Mathar, Sep 26 2009
a(n) = 2*(3n+1)/(4-((2n+2) mod 4)). - Bill McEachen, Jan 09 2015
If a(2n-1) = x then a(2n) = 2x+3. - Robert G. Wilson v, Jan 26 2015
Let the reduced Collatz procedure be defined as Cr(n) = (3*n+1)/2. For odd n, a(n) = Cr(n). For even n, a(n) = Cr(4*n+1)/2. - Joe Slater, Nov 29 2016
a(n) = 2*a(n-2) - a(n-4). - G. C. Greubel, Apr 13 2017
Extensions
All comments changed to formulas by R. J. Mathar, Sep 26 2009
New name from Charles R Greathouse IV, Jan 13 2015
Name corrected by Joe Slater, Nov 29 2016
Comments