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.

A125710 In the "3x+1" problem, let 0 denote a halving step and 1 denote an x->3x+1 step. Then a(n) is obtained by writing the sequence of steps needed to reach 1 from 2n+1 and reading it as a decimal number.

This page as a plain text file.
%I A125710 #12 Oct 31 2019 11:48:17
%S A125710 4,80,16,43280,305424,10512,272,87056,2320,665872,64,21520,4860176,
%T A125710 1676649379371438023024192690344976,141584,
%U A125710 54056611079304389108412587463696,38414608,5136,1091856,11358841104
%N A125710 In the "3x+1" problem, let 0 denote a halving step and 1 denote an x->3x+1 step. Then a(n) is obtained by writing the sequence of steps needed to reach 1 from 2n+1 and reading it as a decimal number.
%e A125710 7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1, so a(3) is the
%e A125710 decimal equivalent of 1010100100010000, which is 43280.
%t A125710 f[x_] := If[EvenQ[x], x/2, 3x + 1];g[n_] := FromDigits[Mod[Most[NestWhileList[f, 2n + 1, # > 1 &, {2, 1}]], 2], 2];Table[g[n], {n, 0, 30}] (* _Ray Chandler_, Feb 02 2007 *)
%Y A125710 Cf. A125711, A125626.
%K A125710 nonn,base
%O A125710 0,1
%A A125710 _N. J. A. Sloane_, Feb 01 2007
%E A125710 Extended by _Ray Chandler_, Feb 02 2007