%I #25 Dec 11 2023 06:25:29
%S 5,26,13,66,33,11,56,28,14,7,36,18,9,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,
%T 1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,
%U 6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6,3,1,6
%N Trajectory of 5 under the '5x+1' map.
%C The 'Px + 1 map': if x is divisible by any prime less than P then divide out these primes one at a time starting with the smallest; otherwise multiply x by P and add 1. This is similar to A057684, but with P = 5 instead of P = 13. - _Alonso del Arte_, Jul 04 2015
%H Colin Barker, <a href="/A057688/b057688.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1).
%F a(0) = 5, a(n) = a(n - 1)/2 if a(n - 1) is even, a(n) = a(n - 1)/3 if a(n - 1) is odd and divisible by 3, a(n) = 5a(n - 1) otherwise.
%F From _Colin Barker_, Oct 10 2019: (Start)
%F G.f.: (5 + 26*x + 13*x^2 + 61*x^3 + 7*x^4 - 2*x^5 - 10*x^6 - 5*x^7 + 3*x^8 - 49*x^9 + 8*x^10 + 4*x^11 + 2*x^12 - 33*x^13 - 17*x^14 - 3*x^15) / ((1 - x)*(1 + x + x^2)).
%F a(n) = a(n-3) for n>15.
%F (End)
%e 7 is odd and not divisible by 3, so it's followed by 5 * 7 + 1 = 36.
%e 36 is even, so it's followed by 36/2 = 18.
%e 18 is even, so it's followed by 18/2 = 9.
%e 9 is odd and divisible by 3, so it's followed by 9/3 = 3.
%t NestList[If[EvenQ[#], #/2, If[Mod[#, 3] == 0, #/3, 5# + 1]] &, 5, 100] (* _Alonso del Arte_, Jul 04 2015 *)
%o (PARI) Vec((5 + 26*x + 13*x^2 + 61*x^3 + 7*x^4 - 2*x^5 - 10*x^6 - 5*x^7 + 3*x^8 - 49*x^9 + 8*x^10 + 4*x^11 + 2*x^12 - 33*x^13 - 17*x^14 - 3*x^15) / ((1 - x)*(1 + x + x^2)) + O(x^100)) \\ _Colin Barker_, Oct 10 2019
%Y Cf. A057446, A057216, A057522, A057534, A057614. See also A033478, A057684, A057685, A057686, A057687, A057689, A057690, A057691.
%Y Cf. A259207.
%K nonn,easy
%O 0,1
%A _N. J. A. Sloane_, Oct 20 2000
|