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.

A248797 Number of terms > 1 in Fibonacci-variation of Collatz sequence starting with (1, 2n+1).

This page as a plain text file.
%I A248797 #30 May 21 2025 06:33:34
%S A248797 0,1,2,1,5,5,4,1,8,3,2,3,3,5,5,1,10,4,7,3,9,7,5,4,7,2,3,11,10,12,7,1,
%T A248797 12,6,4,6,17,10,9,6,13,5,2,4,10,10,7,7,5,6,11,8,7,15,7,10,15,9,12,9,
%U A248797 17,8,14,1,16,8,6,5,11,12,8,8,11,13,8,9,8,12,4
%N A248797 Number of terms > 1 in Fibonacci-variation of Collatz sequence starting with (1, 2n+1).
%C A248797 In a Fibonacci-variation of Collatz sequence the next term is the odd part of the sum of the preceding two terms. The sequence terminates when 1 is reached. All sequences with initial values {1, 2n+1} terminate.
%C A248797 Proof: Let FC be Fibonacci-variation of Collatz sequence, then FC_{n+1} <= max(FC_{n},FC_{n-1}), with = only if FC_{n}=FC_{n-1}. Therefore FC cannot get into a loop of length greater than 1 (because for all i>n FC_{i}< max(FC_{n},FC_{n+1}). When FC_{n} and FC_{n-1} are coprime, FC_{n} and FC_{n+1} are coprime as well. We conclude that with initial values 1 and 2n+1 (n>0) all pairs of consecutive terms must be coprime, hence cannot become constant (loop of length 1) different from 1.
%H A248797 Alois P. Heinz, <a href="/A248797/b248797.txt">Table of n, a(n) for n = 0..20000</a>
%e A248797 a(8)=8 as the Fibonacci-Collatz sequence starting with 1, 17 becomes 1, 17, 9, 13, 11, 3, 7, 5, 3, 1 and has 8 terms > 1.
%p A248797 b:= proc(i, j) local m, r; m:= i+j;
%p A248797       while irem(m, 2, 'r')=0 do m:=r od; m
%p A248797     end:
%p A248797 a:= proc(n) local i, j, k; i, j:= 1, 2*n+1;
%p A248797       for k from 0 while j<>1 do i, j:= j, b(i, j) od; k
%p A248797     end:
%p A248797 seq(a(n), n=0..100);  # _Alois P. Heinz_, Mar 15 2015
%t A248797 b[i_, j_] := Module[{m, r}, m = i+j; While[Mod[m, 2] == 0, r = Quotient[m, 2]; m = r]; m];
%t A248797 a[n_] := Module[{i, j, k}, {i, j} = {1, 2*n+1}; For[k = 0, j != 1, {i, j} = {j, b[i, j]}; k++]; k];
%t A248797 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, May 21 2025, after _Alois P. Heinz_ *)
%Y A248797 Cf. A000045, A006577, A174429.
%K A248797 nonn
%O A248797 0,3
%A A248797 _Floor van Lamoen_, Mar 03 2015