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.

A028389 The 5x + 1 sequence beginning at 7.

This page as a plain text file.
%I A028389 #28 Nov 03 2022 12:38:30
%S A028389 7,36,18,9,46,23,116,58,29,146,73,366,183,916,458,229,1146,573,2866,
%T A028389 1433,7166,3583,17916,8958,4479,22396,11198,5599,27996,13998,6999,
%U A028389 34996,17498,8749,43746,21873,109366,54683,273416,136708,68354,34177,170886,85443,427216
%N A028389 The 5x + 1 sequence beginning at 7.
%H A028389 Alois P. Heinz, <a href="/A028389/b028389.txt">Table of n, a(n) for n = 0..10000</a>
%F A028389 a(0) = 7; a(n) = 5*a(n-1) + 1 if a(n-1) is odd, a(n) = a(n-1)/2 otherwise.
%p A028389 f := proc(n) option remember; if n = 0 then 7 elif f(n-1) mod 2 = 0 then f(n-1)/2 else 5*f(n-1)+1; fi; end; seq(f(n), n=0..50);
%t A028389 a[0] = 7; a[n_] := a[n] = If[OddQ[a[n-1]], 5 a[n-1] + 1, a[n-1]/2];
%t A028389 a /@ Range[0, 50] (* _Jean-François Alcover_, Nov 03 2020 *)
%t A028389 NestList[If[OddQ[#],5#+1,#/2]&,7,50] (* _Harvey P. Dale_, Nov 03 2022 *)
%Y A028389 Cf. A259207, A328010, A328011.
%K A028389 nonn
%O A028389 0,1
%A A028389 _N. J. A. Sloane_, _Dean Hickerson_
%E A028389 Named edited by _Andrew Howroyd_, Aug 21 2020