OFFSET
0,1
COMMENTS
The sequence enters a repeating cycle of length 18, starting at n = 8. - Felix Fröhlich, Jul 10 2017
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, E16.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
FORMULA
From Colin Barker, Mar 27 2019: (Start)
G.f.: (84 + 42*x + 21*x^2 + 62*x^3 + 31*x^4 + 92*x^5 + 46*x^6 + 23*x^7 + 68*x^8 + 34*x^9 + 17*x^10 + 50*x^11 + 25*x^12 + 74*x^13 + 37*x^14 + 110*x^15 + 55*x^16 + 164*x^17 - 2*x^18 - x^19 + 101*x^20 - x^21 + 151*x^22 - x^23 + 226*x^24 + 113*x^25) / ((1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)*(1 - x^3 + x^6)*(1 + x^3 + x^6)).
a(n) = a(n-18) for n>25.
(End)
MATHEMATICA
NestList[If[EvenQ[#], #/2, 3# - 1] &, 84, 100] (* Alonso del Arte, Jul 05 2017 *)
PROG
(PARI) terms(n) = my(x=84, i=0); while(i < n, print1(x, ", "); if(x%2==0, x=x/2, x=3*x-1); i++)
/* Print initial 100 terms as follows */
terms(100) \\ Felix Fröhlich, Jul 10 2017
(PARI) Vec((84 + 42*x + 21*x^2 + 62*x^3 + 31*x^4 + 92*x^5 + 46*x^6 + 23*x^7 + 68*x^8 + 34*x^9 + 17*x^10 + 50*x^11 + 25*x^12 + 74*x^13 + 37*x^14 + 110*x^15 + 55*x^16 + 164*x^17 - 2*x^18 - x^19 + 101*x^20 - x^21 + 151*x^22 - x^23 + 226*x^24 + 113*x^25) / ((1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)*(1 - x^3 + x^6)*(1 + x^3 + x^6)) + O(x^60)) \\ Colin Barker, Mar 27 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Name edited by Felix Fröhlich, Jul 10 2017
STATUS
approved