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!)
A338625 a(1) = 1; for n > 1, ceiling(a(n-1)/2)+3 if a(n-1) and n are coprime, otherwise a(n) = GCD(a(n-1),n)*2+1. 0
1, 4, 5, 6, 6, 13, 10, 5, 6, 5, 6, 13, 27, 17, 12, 9, 8, 5, 6, 5, 6, 5, 6, 13, 10, 5, 6, 5, 6, 13, 10, 5, 6, 5, 11, 9, 8, 5, 6, 5, 6, 13, 10, 5, 11, 9, 8, 17, 12, 5, 6, 5, 6, 13, 10, 5, 6, 5, 6, 13, 10, 5, 6, 5, 11, 23, 15, 11, 9, 8, 7, 7, 7, 7, 7, 7, 15, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(2) = 4. Because a(1) = 1 and 2 are coprime: ceiling(1/2)+3 = 4.
MATHEMATICA
Nest[Append[#1, If[GCD[#1[[-1]], #2] == 1, Ceiling[#1[[-1]]/2] + 3, 2 GCD[#1[[-1]], #2] + 1]] & @@ {#, Length[#] + 1} &, {1}, 77] (* Michael De Vlieger, Nov 04 2020 *)
CROSSREFS
Sequence in context: A116962 A273777 A023846 * A046345 A325103 A004445
KEYWORD
nonn
AUTHOR
Noah Schlüssel, Nov 04 2020
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 June 1 12:42 EDT 2024. Contains 373023 sequences. (Running on oeis4.)