The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A323275 Let f(p, q) denote the pair (p + q, wt(p) + wt(q)); a(n) is obtained by iterating f starting at (n, 1) until p/q is an integer (and then a(n) is that integer), or if no integer is ever reached then a(n) = -1. (Here wt is binary weight, A000120.) 3
1, 2, 2, 2, 2, 2, 2, 10, 7, 10, 3, 7, 5, 10, 7, 22, 6, 22, 5, 7, 8, 22, 10, 10, 8, 8, 10, 10, 6, 8, 22, 8, 22, 8, 9, 8, 10, 8, 8, 22, 10, 22, 22, 22, 22, 22, 8, 15, 22, 11, 15, 15, 22, 11, 16, 16, 22, 15, 10, 16, 15, 22, 15, 14, 22, 14, 17, 23, 40, 15, 22, 22, 40, 12, 22, 22, 16, 12, 18, 27, 18, 40, 40, 40, 22, 40, 14, 18, 34 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Jeffrey C. Lagarias, Wild and Wooley Numbers, arXiv preprint arXiv:math/0411141 [math.NT], 2004-2005.
EXAMPLE
(8, 1) -> (9, 2) -> (11, 3) -> (14, 5) -> (19, 5) -> (24, 5) -> (29, 4) -> (33, 5) -> (38, 4) -> (42, 4) -> (46, 4) -> (50, 5). 50/5 is an integer, so a(8) = 50/5 = 10.
PROG
(PARI) f(v) = return([v[1]+v[2], hammingweight(v[1])+hammingweight(v[2])]);
a(n) = {my(nb = 0, v = [n, 1]); while (1, v = f(v); nb++; if (frac(q=v[1]/v[2]) == 0, return (q))); } \\ Michel Marcus, Jan 13 2019
CROSSREFS
Sequence in context: A339165 A129381 A319991 * A139514 A330955 A330956
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Jan 12 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 18:22 EDT 2024. Contains 372494 sequences. (Running on oeis4.)