login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A323356 For a rational number p/q let f(p/q) = (p+q) / (A000120(p) + A000120(q)); a(n) is obtained by iterating f, starting at n/1, until an integer is reached (and then a(n) = that integer), or if no integer is ever reached then a(n) = -1. 1
1, 2, 2, 2, 2, 2, 2, -1, 7, -1, 3, 7, 7, -1, 7, -1, 6, -1, 5, 7, 7, -1, -1, -1, -1, 8, -1, -1, 6, 8, -1, 8, 11, 8, 9, 8, -1, 8, 8, 11, -1, 11, 11, 11, -1, 11, 8, -1, 8, 11, -1, -1, 11, 11, 8, 16, -1, 15, 10, 16, -1, -1, 15, 14, 22, 14, 17, 23, 11, 15, 11, 11, 8, 12, 11, 11, 16, 12, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..79.

EXAMPLE

13/1 -> 14/4=7/2 -> 9/4 -> 13/3 -> 16/5 -> 21/3 = 7 so a(13) = 7.

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.

MATHEMATICA

Array[SelectFirst[Rest@ NestWhileList[(#1 + #2)/(DigitCount[#1, 2, 1] + DigitCount[#2, 2, 1]) & @@ {Numerator@ #, Denominator@ #} &, #, UnsameQ, All], IntegerQ] /. k_ /; MissingQ@ k -> -1 &, 79] (* Michael De Vlieger, Jan 18 2019 *)

CROSSREFS

Cf. A000120, A058971, A059175, A323275, A323375.

Sequence in context: A194342 A230410 A044925 * A319244 A309286 A102671

Adjacent sequences:  A323353 A323354 A323355 * A323357 A323358 A323359

KEYWORD

sign,base

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 22:57 EDT 2020. Contains 336473 sequences. (Running on oeis4.)