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.

A318489 Number of steps to reach a lower number than starting value in 7x+-1 problem, or 0 if never reached.

This page as a plain text file.
%I A318489 #11 Aug 31 2018 09:38:51
%S A318489 0,1,12,1,8,1,4,1,4,1,42,1,8,1,4,1,4,1,23,1,20,1,4,1,4,1,12,1,16,1,4,
%T A318489 1,4,1,282,1,12,1,4,1,4,1,229,1,50,1,4,1,4,1,8,1,35,1,4,1,4,1,8,1,50,
%U A318489 1,4,1,4,1,46,1,8,1,4,1,4,1,225,1,8,1,4,1,4,1,35,1,16,1,4,1,4,1,46,1,27,1,4,1,4,1,16
%N A318489 Number of steps to reach a lower number than starting value in 7x+-1 problem, or 0 if never reached.
%C A318489 The least positive k for which the iterate A317640^k(n) < n.
%C A318489 Also called the dropping time, glide, or stopping time.
%C A318489 a(2n) = 1.
%H A318489 David Barina, <a href="/A318489/b318489.txt">Table of n, a(n) for n = 1..10000</a>
%H A318489 D. Barina, <a href="https://arxiv.org/abs/1807.00908">7x+-1: Close Relative of Collatz Problem</a>, arXiv:1807.00908 [math.NT], 2018.
%H A318489 K. Matthews, <a href="http://www.numbertheory.org/php/barina.html">David Barina's 7x+1 conjecture</a>.
%e A318489 a(5) = 8 because the trajectory is (5, 36, 18, 9, 64, 32, 16, 8, 4, 2, 1, ...) and the first lower number is 4. Thus 8 steps to reach the value 4 starting from the value 5.
%o A318489 (C)
%o A318489 int a(int n0) {
%o A318489         if( n0 == 1 ) return 0;
%o A318489         int s = 0;
%o A318489         for(int n = n0; n >= n0; s++) {
%o A318489                 switch(n%4) {
%o A318489                         case 1: n = 7*n+1; break;
%o A318489                         case 3: n = 7*n-1; break;
%o A318489                         default: n = n/2;
%o A318489                 }
%o A318489         }
%o A318489         return s;
%o A318489 }
%o A318489 (PARI) a7(n) = {my(m=(n+2)%4-2); if(m%2, 7*n + m, n/2)};
%o A318489 a(n) = if (n==1, 0, my(nb=1, m=n, nm); while((nm=a7(m)) >= n, m = nm; nb++); nb); \\ _Michel Marcus_, Aug 28 2018
%Y A318489 Cf. A317640 (7x+-1 function), A102419 (3x+1 equivalent).
%K A318489 nonn,easy
%O A318489 1,3
%A A318489 _David Barina_, Aug 27 2018