cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A350034 a(n) = n/gcd(n,6) if gcd(n,6)>1, 5n + 1 otherwise.

This page as a plain text file.
%I A350034 #37 Oct 07 2023 05:06:47
%S A350034 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,
%T A350034 14,146,5,156,16,11,17,176,6,186,19,13,20,206,7,216,22,15,23,236,8,
%U A350034 246,25,17,26,266,9,276,28,19,29,296,10,306,31,21,32,326
%N A350034 a(n) = n/gcd(n,6) if gcd(n,6)>1, 5n + 1 otherwise.
%C A350034 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.
%H A350034 Winston de Greef, <a href="/A350034/b350034.txt">Table of n, a(n) for n = 0..9999</a>
%H A350034 <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,2,0,0,0,0,0,-1).
%F A350034 a(n) = 2*a(n-6) - a(n-12). - _Wesley Ivan Hurt_, Oct 20 2022
%F A350034 Sum_{k=1..n} a(k) ~ (23/24)*n^2. - _Amiram Eldar_, Oct 07 2023
%t A350034 f[n_]:=If[GCD[n,6]>1,n/GCD[n,6],5*n+1]; Table[f[n],{n,0,100}]
%o A350034 (PARI) a(n) = my(g = gcd(n, 6)); if (g>1, n/g, 5*n+1); \\ _Michel Marcus_, Dec 09 2021
%o A350034 (Python)
%o A350034 from math import gcd
%o A350034 def A350034(n): return n//g if (g:=gcd(n,6)) > 1 else 5*n+1 # _Chai Wah Wu_, Dec 29 2021
%Y A350034 Cf. A006370, A089128, A350035.
%K A350034 nonn,easy
%O A350034 0,2
%A A350034 _José María Grau Ribas_, Dec 09 2021