OFFSET
1,1
COMMENTS
a(n) <= 55 * n, as 55/1 is the last and largest FRACTRAN fraction.
A quasipolynomial of order 6469693230 = 29#. - Charles R Greathouse IV, Jul 31 2016
Apparent simple regularities do not necessarily hold. It is true that a(2n)/15 = a(4n)/30, but for n = 11, 13, 17, 19, 22, 23, ... this is not equal to n. Also, a(2k-1) = 55k holds for more than 60%, but not for all k >= 1. - M. F. Hasler, Jun 15 2017
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, FRACTRAN
Wikipedia, Conway's PRIMEGAME
FORMULA
MATHEMATICA
conwayFracs = {17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/2, 1/7, 55}; conwayProc[n_] := Module[{curr = 1/2, iter = 1}, While[Not[IntegerQ[curr]], curr = conwayFracs[[iter]]n; iter++]; Return[curr]]; Table[conwayProc[n], {n, 60}] (* Alonso del Arte, Jan 24 2012 *)
PROG
(Haskell)
import Data.Ratio ((%), numerator, denominator)
a203907 n = numerator $ head
[x | x <- map (* fromInteger n) fracts, denominator x == 1]
where fracts = zipWith (%) a202138_list a203363_list
a203907_list = map a203907 [1..]
(PARI) {A203907(n, V=[17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/2, 1/7, 55])=for(i=1, #V, denominator(V[i]*n)==1 && return(V[i]*n))} \\ Charles R Greathouse IV, Jul 31 2016, edited by M. F. Hasler, Jun 15 2017
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
Reinhard Zumkeller, Jan 24 2012
STATUS
approved