|
|
A033480
|
|
3x + 1 sequence beginning at 15.
|
|
3
|
|
|
15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
FORMULA
|
a(0) = 15, a(n) = a(n - 1)/2 if a(n - 1) is even or 3a(n - 1) + 1 if a(n - 1) is odd.
G.f.: (15 + 46*x + 23*x^2 + 55*x^3 - 11*x^4 + 83*x^5 - 17*x^6 + 125*x^7 - 26*x^8 - 13*x^9 - 140*x^10 - 70*x^11 - 35*x^12 - 4*x^13 - 2*x^14 - x^15 - 14*x^16 - 7*x^17) / ((1 - x)*(1 + x + x^2)).
a(n) = a(n-3) for n>17.
(End)
|
|
EXAMPLE
|
15 is odd, so the next term is 3 * 15 + 1 = 46.
46 is even, so the next term is 46/2 = 23.
|
|
MATHEMATICA
|
NestList[If[EvenQ[#], #/2, 3# + 1] &, 15, 100] (* Harvey P. Dale, Dec 27 2011 *)
|
|
PROG
|
(PARI) Vec((15 + 46*x + 23*x^2 + 55*x^3 - 11*x^4 + 83*x^5 - 17*x^6 + 125*x^7 - 26*x^8 - 13*x^9 - 140*x^10 - 70*x^11 - 35*x^12 - 4*x^13 - 2*x^14 - x^15 - 14*x^16 - 7*x^17) / ((1 - x)*(1 + x + x^2)) + O(x^80)) \\ Colin Barker, Oct 04 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|