OFFSET
1,1
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).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..5000
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.
Wikipedia, Conway's PRIMEGAME
MAPLE
with(numtheory): f:= proc(n) local l, b, d; l:= sort([divisors (n)[]]); b:= l[nops(l)-1]; n-1 +(6*n+2)*(n-b) +2*add(floor(n/d), d=b..n-1) end: a:= proc(n) option remember; `if`(n=1, f(2), a(n-1) +add(f(i), i=ithprime(n-1)+1..ithprime(n))) end: seq(a(n), n=1..40); # Alois P. Heinz, Aug 12 2009
MATHEMATICA
f[n_] := Module[{l, b, d}, l = Divisors [n]; b = l[[-2]]; n-1 + (6*n+2)*(n-b) + 2*Sum[Floor[n/d], {d, b, n-1}]]; a[n_] := a[n] = If[n == 1, f[2], a[n-1] + Sum[f[i], {i, Prime[n-1]+1, Prime[n]}]]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Oct 04 2013, translated from Alois P. Heinz's Maple program *)
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
EXTENSIONS
More terms from Alois P. Heinz, Aug 12 2009
STATUS
approved