OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
n=100, p(100)=541, c(100)=133, a(100)=9 because 541 = 4*133 + 9.
MATHEMATICA
With[{nn=80}, Module[{prs=Prime[Range[nn]], comps}, comps=Take[Complement[ Range[2, Prime[nn]+1], prs], Length[prs]]; Mod[#[[1]], #[[2]]]&/@ Thread[ {prs, comps}]]] (* Harvey P. Dale, Apr 18 2012 *)
PROG
(PARI) Composite(n) = { local(k); k=n + primepi(n) + 1; while (k != n + primepi(k) + 1, k = n + primepi(k) + 1); return(k) } { for (n = 1, 1000, a=prime(n)%Composite(n); write("b065859.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 01 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 26 2001
STATUS
approved