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.

A316783 Seed values of hailstone sequences for which, by the time they first reach 1, the ratio of odd terms to even terms is exactly 1/2. (The seed value itself is included in the ratio calculation.)

This page as a plain text file.
%I A316783 #34 Aug 02 2018 07:19:18
%S A316783 4,5,6,11,14,15,18,19,25,33,43,57,59,78,79,105,135,139,185,187,191,
%T A316783 246,247,249,254,255,329,338,339,359,427,438,439,443,450,451,478,479,
%U A316783 569,585,590,591,601,636,637,638,758,759,767,779,786,787,801,849,850,851
%N A316783 Seed values of hailstone sequences for which, by the time they first reach 1, the ratio of odd terms to even terms is exactly 1/2. (The seed value itself is included in the ratio calculation.)
%C A316783 1/2 is the most common odd/even ratio for these sequences. For seed values from 2 to 2^17, it is the odd/even ratio for 4454 of those sequences. The next most common ratio is 5/11, with 1834 sequences. (This is all empirical observation, using Mathematica.)
%H A316783 Matt Enlow, <a href="/A316783/b316783.txt">Table of n, a(n) for n = 1..10000</a>
%H A316783 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F A316783 { k : A006666(k)/A078719(k) = 2 }. - _Alois P. Heinz_, Aug 02 2018
%e A316783 The hailstone sequence starting with 11 (and ending at 1) is 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. Five of those terms are odd, and the other ten are even, giving an odd/even ratio of 1/2. Therefore 11 is a term in this sequence.
%p A316783 b:= proc(n) option remember; `if`(n=1, [1, 0],
%p A316783       `if`(n::odd, [1, 0]+b(3*n+1), [0, 1]+b(n/2)))
%p A316783     end:
%p A316783 a:= proc(n) option remember; local k; for k from a(n-1)
%p A316783       +1 while (l-> 2*l[1]<>l[2])(b(k)) do od; k
%p A316783     end: a(0):=0:
%p A316783 seq(a(n), n=1..100);  # _Alois P. Heinz_, Aug 02 2018
%t A316783 collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1]&, n, # != 1 &];
%t A316783 A316783 = Select[Range[2, 1000], With[{c = Mod[collatz[#], 2]}, 2 Total[c] == Total[1 - c]] &]
%o A316783 (PARI) is(n) = my(x=n, even=0, odd=0); while(1, if(x%2==0, x=x/2; even++, x=3*x+1; odd++); if(x==1, odd++; break)); odd/even==1/2 \\ _Felix Fröhlich_, Jul 13 2018
%Y A316783 Cf. A006370, A006666, A078719.
%K A316783 nonn
%O A316783 1,1
%A A316783 _Matt Enlow_, Jul 13 2018