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.

Showing 1-4 of 4 results.

A007542 Successive integers produced by Conway's PRIMEGAME.

Original entry on oeis.org

2, 15, 825, 725, 1925, 2275, 425, 390, 330, 290, 770, 910, 170, 156, 132, 116, 308, 364, 68, 4, 30, 225, 12375, 10875, 28875, 25375, 67375, 79625, 14875, 13650, 2550, 2340, 1980, 1740, 4620, 4060, 10780, 12740, 2380, 2184, 408, 152
Offset: 1

Views

Author

Keywords

Comments

Conway's PRIMEGAME produces the terms 2^prime in increasing order.
From Daniel Forgues, Jan 20 2016: (Start)
Pairs (n, a(n)) such that a(n) = 2^k are (1, 2^1), (20, 2^2), (70, 2^3), (282, 2^5), (711, 2^7), (2376, 2^11), (3894, 2^13), (8103, 2^17), ...
Numbers n such that a(n) = 2^k are 1, 20, 70, 282, 711, 2376, 3894, 8103, ... [This is 1 + A007547. - N. J. A. Sloane, Jan 25 2016] (End)

References

  • D. Olivastro, Ancient Puzzles. Bantam Books, NY, 1993, p. 21.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a007542 n = a007542_list !! (n-1)
    a007542_list = iterate a203907 2  -- Reinhard Zumkeller, Jan 24 2012
    
  • Maple
    l:= [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]: a:= proc(n) option remember; global l; local p, k; if n=1 then 2 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); # Alois P. Heinz, Aug 12 2009
  • 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}; a[1] = 2; A007542[n_] := A007542[n] = (p = A007542[n - 1]; k = 1; While[ ! IntegerQ[p * conwayFracs[[k]]], k++]; p * conwayFracs[[k]]); Table[A007542[n], {n, 42}] (* Jean-François Alcover, Jan 23 2012, after Alois P. Heinz *)
  • Python
    from fractions import Fraction
    nums = [17, 78, 19, 23, 29, 77, 95, 77,  1, 11, 13, 15, 1, 55] # A202138
    dens = [91, 85, 51, 38, 33, 29, 23, 19, 17, 13, 11,  2, 7,  1] # A203363
    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(2, PRIMEGAME, steps=42)) # Michael S. Branicky, Feb 15 2021

Formula

a(n+1) = A203907(a(n)), a(1) = 2. [Reinhard Zumkeller, Jan 24 2012]

A183133 Number of steps to compute the n-th prime in PRIMEGAME using Kilminster's Fractran program with only nine fractions.

Original entry on oeis.org

10, 46, 196, 500, 1428, 2488, 4588, 6840, 10546, 17118, 23064, 33332, 44472, 55848, 70330, 90836, 115136, 137912, 168802, 201000, 233542, 276680, 320332, 373198, 439722, 503810, 568334, 640092, 712314, 792186, 917090, 1023878, 1146632, 1263818, 1419298
Offset: 1

Views

Author

Alois P. Heinz, Dec 26 2010

Keywords

References

  • D. Olivastro, Ancient Puzzles. Bantam Books, NY, 1993, p. 21.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          local l,p,m,k;
          l:= [3/11, 847/45, 143/6, 7/3, 10/91, 3/7, 36/325, 1/2, 36/5]:
          if n=1 then b(0):= 10; a(0):= 0
                 else a(n-1)
          fi;
          p:= b(n-1);
          for m do
             for k while not type(p*l[k], integer)
             do od; p:= p*l[k];
             if 10^ilog10(p)=p then break fi
          od:
          b(n):= p;
          m + a(n-1)
        end:
    seq(a(n), n=1..20);
  • Mathematica
    a[n_] := a[n] = Module[{l, p, m, k},
         l = {3/11, 847/45, 143/6, 7/3, 10/91, 3/7, 36/325, 1/2, 36/5};
         If[n == 1, b[0] = 10; a[0] = 0, a[n - 1]]; p = b[n - 1];
         For[m = 1, True, m++,
              For[k = 1, !IntegerQ[p*l[[k]]], k++];
              p = p*l[[k]];If[10^(Length@IntegerDigits[p]-1) == p, Break[]]];
         b[n] = p; m + a[n - 1]];
    Array[a, 20] (* Jean-François Alcover, Apr 02 2021, after Alois P. Heinz *)

A267572 Number of steps J. H. Conway's Fractran program needs to calculate the n-th prime.

Original entry on oeis.org

19, 50, 211, 577, 2083, 3469, 7361, 10395, 17915, 35249, 43188, 72392, 97236, 113324, 146556, 209098, 285307, 317925, 417234, 494939, 541264, 684114, 789130, 968524, 1249354, 1408123, 1500944, 1679217, 1781388, 1980305
Offset: 1

Views

Author

Ivan N. Ianakiev, Jan 17 2016

Keywords

Comments

The sieve consists of the fractions {17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1}.

Examples

			For n = 1, start with 2^n and find the first fraction (fraction1 = 15/2) where the product (2^n)*fraction1 is an integer (integer1 = 15). With integer1 repeat the above, i.e., find the first fraction (fraction2 = 55/1) where integer1*fraction2 is an integer (integer2 = 825). Repeat until a power of 2 is reached (2^2 in this case). The exponent of 2 is prime(1) and a(1) = 19 is the number of steps to reach it.
		

References

  • Dominic Olivastro, Ancient Puzzles, Bantam Books, 1993, pp. 20-21.

Crossrefs

Programs

  • Mathematica
    fracList = {17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1};
    stepCount[n_] := n * fracList[[First[Flatten[Position[n * fracList, First[Select[n * fracList, IntegerQ]]]]]]];
    A267572[n_] := Length[NestWhileList[stepCount[#] &, 2^n, stepCount[#] != 2^Prime[n] &]];
    Table[tempVar = A267572[n]; Print["a(", n,") = ", tempVar]; tempVar, {n, 30}]

A334722 Numerators of fractions in Kilminster's FracTran program for prime numbers, 10-fraction version.

Original entry on oeis.org

7, 99, 13, 39, 36, 10, 49, 7, 1, 91
Offset: 1

Views

Author

Alonso del Arte, May 09 2020

Keywords

Comments

Like Conway's PRIMEGAME (A202138/A203363), Kilminster's program delivers the prime numbers as exponents of powers of a base, but the base is 10 rather than 2.

References

  • John H. Conway and Tim Hsu, Some Very Interesting Sequences, in T. Shubin, D. F. Hayes, and G. Alexanderson (eds.), Expeditions in Mathematics, MAA Spectrum series, Washington, DC, 2011, chapter 6, pp. 75-86. See page 78.

Crossrefs

Kilminster also came up with a 9-fraction program. See A183132, A183133.
Showing 1-4 of 4 results.