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!)
A350035 Number of steps to reach 1 under repeated applications of the A350034 map, or -1 if 1 is never reached. 2
0, 1, 1, 2, 11, 1, 3, 3, 2, 12, 7, 2, 9, 4, 12, 4, 6, 2, 6, 13, 4, 8, 16, 3, 6, 10, 3, 5, 13, 12, 12, 5, 8, 7, 12, 2, 14, 7, 10, 14, 9, 4, 4, 9, 13, 17, 21, 4, 11, 7, 7, 11, 19, 3, 19, 6, 7, 14, 18, 13, 9, 13, 5, 6, 13, 8, 8, 8, 17, 13, 20, 3, 11, 15, 7, 8, 15, 10, 10, 15, 4, 10, 15, 5, 22, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
EXAMPLE
5 -> 26 -> 13 -> 66 -> 11 -> 56 -> 28 -> 14 -> 7 -> 36 -> 6 -> 1. Thus a(5) = 11.
MAPLE
a:= proc(n) option remember; `if`(n=1, 0, 1+
a((g-> `if`(g>1, n/g, 5*n+1))(igcd(n, 6))))
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jan 19 2022
MATHEMATICA
f[n_]:=If[GCD[n, 6]>1, n/GCD[n, 6], 5*n+1]; Table[f[n], {n, 0, 100}];
S[n_]:=S[n]=Which[n==1, 0, f[n]==1, 1, True, 1+S[f[n]]];
Table[S[n], {n, 1, 86}]
PROG
(PARI)
A350034(n) = my(g = gcd(n, 6)); if (g>1, n/g, 5*n+1);
a(n)=my(r=0); while(n != 1, n = A350034(n); r+=1); r \\ Winston de Greef, Oct 02 2023
CROSSREFS
Sequence in context: A348942 A057213 A326042 * A353877 A250221 A365610
KEYWORD
nonn
AUTHOR
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 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)