

A063268


Let f be a function on rationals p/q (p,q coprime) defined by f(p/q) = abs(pq)/g(p), where g(p) is the next odd number (starting with p) that we get after iteration of h(n) = n/2 when n is even, 5n1 when n is odd. Start with f(n/1) and iterate f until it reaches again an integer, which is a(n). If no integer is reached, then a(n)=0.


3



0, 1, 5, 3, 1, 1, 19, 7, 3, 7, 3, 19, 12, 6, 41, 15, 5, 13, 7, 35, 15, 5, 21, 9, 13, 31, 41, 4, 55, 1, 85, 31, 9, 25, 2, 17, 4, 1, 8, 9, 7, 15, 5, 75, 5, 33, 43, 7, 10, 7, 15, 15, 6, 19, 15, 4, 29, 17, 3, 65, 31, 23, 173, 63, 17, 49, 4, 43, 23, 3, 55, 17, 9, 7, 25, 19, 8, 71, 47, 5, 3, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

n=333 is the smallest n>1 with a(n)=0.


LINKS

Michel Marcus, Table of n, a(n) for n = 1..10000


EXAMPLE

For n=6, we get 6/1 > 5/3 > 2/3 > 1/1 so a(6)=1.
For n=333, we get 333/1 > 332/13 > 319/83 > 236/797 > 561/59 > 502/701 > 199/251 > 52/497 > 445/13 > 432/139 > 293/27 > 266/183 > 83/133 > 50/207 > 157/25 > 132/49 > 83/33 > 50/207 so a(333)=0.


PROG

(PARI) h(n) = if (n%2, 5*n1, n/2);
g(n) = {n = h(n); while (!(n%2), n = h(n)); n; }
f(n) = {my(p = numerator(n), q = denominator(n)); abs(pq)/g(p); }
a(n) = {my(v = []); for (k=1, oo, n = f(n); if (denominator(n) == 1, return(n)); if (#select(x>(x==n), v) > 0, return(0)); v = concat(v, n); ); } \\ Michel Marcus, Mar 23 2020


CROSSREFS

Cf. A062366, A063256, A063257.
Sequence in context: A204063 A132400 A232810 * A179613 A196613 A151903
Adjacent sequences: A063265 A063266 A063267 * A063269 A063270 A063271


KEYWORD

nonn


AUTHOR

Floor van Lamoen, Jul 12 2001


STATUS

approved



