login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007547 Number of steps to compute n-th prime in PRIMEGAME (slow version).
(Formerly M5075)
6
19, 69, 281, 710, 2375, 3893, 8102, 11361, 19268, 36981, 45680, 75417, 101354, 118093, 152344, 215797, 293897, 327571, 429229, 508284, 556494, 701008, 809381, 990746, 1274952, 1435957, 1531854, 1712701, 1820085, 2021938 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

REFERENCES

J. H. Conway, FRACTRAN: a simple universal programming language for arithmetic, in T. M. Cover and Gopinath, eds., Open Problems in Communication and Computation, Springer, NY 1987, pp. 4-26.

R. K. Guy, Conway's prime producing machine. Math. Mag. 56 (1983), no. 1, 26-33.

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).

MAPLE

a:= proc(n) option remember; local l, p, m, k;

      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/1]:

      if n=1 then b(0):= 2; 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 2^ilog2(p)=p then break fi

      od:

      b(n):= p;

      m + a(n-1)

    end:

seq (a(n), n=1..10);  # Alois P. Heinz, May 1, 2011

PROG

(Haskell)

import Data.List (elemIndices)

a007547 n = a007547_list !! n

a007547_list = tail $ elemIndices 2 $ map a006530 a007542_list

-- Reinhard Zumkeller, 24 Jan 2012

CROSSREFS

Cf. A007542, A007546.

Cf. A006530, A034785.

Sequence in context: A044538 A204675 A007546 * A010007 A172078 A196136

Adjacent sequences:  A007544 A007545 A007546 * A007548 A007549 A007550

KEYWORD

easy,nonn,nice,changed

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

EXTENSIONS

More terms from Alois P. Heinz (heinz(AT)hs-heilbronn.de), May 01 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 4 07:37 EST 2012. Contains 204806 sequences.