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.

A183132 Successive integers produced by Conway's PRIMEGAME using Kilminster's Fractran program with only nine fractions.

Original entry on oeis.org

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
Offset: 1

Views

Author

Alois P. Heinz, Dec 26 2010

Keywords

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.

Crossrefs

Programs

  • 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]]]];
    Array[a, 50] (* Jean-François Alcover, May 28 2018, from Maple *)
  • 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
    print(orbit(10, PRIMEGAME, steps=44)) # Michael S. Branicky, Oct 05 2021