OFFSET
0,1
COMMENTS
For x in (0,1], define P(x) = min{p: p prime, 1/x < p}, Phi(x) = P(x)x - 1. Costé prime expansion of x(0) is sequence a(0), a(1), ... given by x(n) = Phi(x(n-1)) (n>0), a(n) = P(x(n)) (n >= 0).
Costé prime expansion = Engel expansion where all terms must be primes (cf. A006784).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..2000
A. Costé, Sur un système fibré lié à la suite des nombres premiers, Exper. Math., 11 (2002), 383-405.
MAPLE
Digits := 200: P := proc(x) local y; y := ceil(evalf(1/x)); if isprime(y) then y else nextprime(y); fi; end; F := proc(x) local y, i, t1; y := x; t1 := []; for i from 1 to 50 do p := P(y); t1 := [op(t1), p]; y := p*y-1; od; t1; end; F(Pi-3);
MATHEMATICA
$MaxExtraPrecision = 40; P[x_] := Module[{y}, y = Ceiling[1/x]; If[PrimeQ[y], y, NextPrime[y]]]; F[x_] := Module[{y, i, t1}, y = x; t1 = {}; For[i = 1, i <= 70, i++, AppendTo[t1, p = P[y]]; y = p*y-1]; t1]; F[Pi-3] (* Jean-François Alcover, Dec 16 2013, translated from Maple *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Feb 15 2003
STATUS
approved