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!)
A323596 Number of (positive) iterations of f to reach an integer when starting from n/1. If no integer is ever reached then a(n) = -1. f(p/q) = (p + q) / (A000120(p) + A000120(q)). 0
1, 3, 3, 3, 1, 2, 1, -1, 4, -1, 1, 3, 5, -1, 2, -1, 1, -1, 1, 1, 4, -1, -1, -1, -1, 5, -1, -1, 1, 4, -1, 5, 16, 4, 1, 2, -1, 3, 1, 14, -1, 13, 13, 13, -1, 12, 1, -1, 6, 2, -1, -1, 11, 1, 5, 13, -1, 4, 1, 12, -1, -1, 3, 3, 1, 2, 1, 1, 16, 2, 8, 8, 4, 3, 7, 7, 9, 2, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
8/1 -> 9/2 -> 11/3 -> 14/5 -> 19/5 -> 24/5 -> 29/4 -> 33/5 -> 38/4=19/2 -> 21/4 -> 25/4 -> 29/4 and the 5-cycle repeats, so a(8) = -1.
13/1 -> 14/4=7/2 -> 9/4 -> 13/3 -> 16/5 -> 21/3=7 so a(13) = 5.
MATHEMATICA
Array[If[AnyTrue[#, IntegerQ], 1 + LengthWhile[#, ! IntegerQ@ # &], -1] &@ Rest@ NestWhileList[(#1 + #2)/(DigitCount[#1, 2, 1] + DigitCount[#2, 2, 1]) & @@ {Numerator@ #, Denominator@ #} &, #, UnsameQ, All] &, 79] (* Michael De Vlieger, Jan 18 2019 *)
CROSSREFS
Sequence in context: A172358 A119560 A172364 * A323375 A140366 A167817
KEYWORD
sign
AUTHOR
Ctibor O. Zizka, Jan 18 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 April 19 17:51 EDT 2024. Contains 371797 sequences. (Running on oeis4.)