|
|
A183132
|
|
Successive integers produced by Conway's PRIMEGAME using Kilminster's Fractran program with only nine fractions.
|
|
5
|
|
|
10, 5, 36, 858, 234, 5577, 1521, 3549, 8281, 910, 100, 50, 25, 180, 3388, 924, 252, 6006, 1638, 39039, 10647, 24843, 57967, 6370, 700, 300, 7150, 1950, 46475, 12675, 29575, 3250, 360, 6776, 1848, 504, 12012, 3276, 78078, 21294, 507507, 138411, 322959, 753571
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The exponents of exact powers of 10 in this sequence are 1, followed by the successive primes (A008578).
|
|
REFERENCES
|
D. Olivastro, Ancient Puzzles. Bantam Books, NY, 1993, p. 21.
|
|
LINKS
|
Eric Weisstein's World of Mathematics, FRACTRAN.
|
|
MAPLE
|
l:= [3/11, 847/45, 143/6, 7/3, 10/91, 3/7, 36/325, 1/2, 36/5]:
a:= proc(n) option remember;
global l;
local p, k;
if n=1 then 10
else p:= a(n-1);
for k while not type(p*l[k], integer)
do od; p*l[k]
fi
end:
seq(a(n), n=1..50);
|
|
MATHEMATICA
|
l = {3/11, 847/45, 143/6, 7/3, 10/91, 3/7, 36/325, 1/2, 36/5};
a[n_] := a[n] = Module[{p, k}, If[n == 1, 10, p = a[n - 1]; For[k = 1, !IntegerQ[p*l[[k]]], k++]; p*l[[k]]]];
|
|
PROG
|
(Python)
from fractions import Fraction
nums = [ 3, 847, 143, 7, 10, 3, 36, 1, 36]
dens = [11, 45, 6, 3, 91, 7, 325, 2, 5]
PRIMEGAME = [Fraction(num, den) for num, den in zip(nums, dens)]
def succ(n, program):
for i in range(len(program)):
if (n*program[i]).denominator == 1: return (n*program[i]).numerator
def orbit(start, program, steps):
orb = [start]
for s in range(1, steps): orb.append(succ(orb[-1], program))
return orb
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|