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!)
A350034 a(n) = n/gcd(n,6) if gcd(n,6)>1, 5n + 1 otherwise. 2
0, 6, 1, 1, 2, 26, 1, 36, 4, 3, 5, 56, 2, 66, 7, 5, 8, 86, 3, 96, 10, 7, 11, 116, 4, 126, 13, 9, 14, 146, 5, 156, 16, 11, 17, 176, 6, 186, 19, 13, 20, 206, 7, 216, 22, 15, 23, 236, 8, 246, 25, 17, 26, 266, 9, 276, 28, 19, 29, 296, 10, 306, 31, 21, 32, 326 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
The 5x+1 problem is as follows: start with any number n. If gcd(n,6)>1, divide it by gcd(n,6), otherwise multiply it by 5 and add 1. Do we always reach 1? This is an unsolved problem. It is conjectured that the answer is yes.
LINKS
FORMULA
a(n) = 2*a(n-6) - a(n-12). - Wesley Ivan Hurt, Oct 20 2022
Sum_{k=1..n} a(k) ~ (23/24)*n^2. - Amiram Eldar, Oct 07 2023
MATHEMATICA
f[n_]:=If[GCD[n, 6]>1, n/GCD[n, 6], 5*n+1]; Table[f[n], {n, 0, 100}]
PROG
(PARI) a(n) = my(g = gcd(n, 6)); if (g>1, n/g, 5*n+1); \\ Michel Marcus, Dec 09 2021
(Python)
from math import gcd
def A350034(n): return n//g if (g:=gcd(n, 6)) > 1 else 5*n+1 # Chai Wah Wu, Dec 29 2021
CROSSREFS
Sequence in context: A345628 A364129 A336179 * A133419 A010134 A019713
KEYWORD
nonn,easy
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 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)