OFFSET
1,3
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = A002808(n) mod n.
EXAMPLE
n=100, c(100)=133, a(100)=33.
MATHEMATICA
Module[{nn=100, cmps, len}, cmps=Select[Range[nn], CompositeQ]; len=Length[ cmps]; Mod[#[[1]], #[[2]]]&/@Thread[{cmps, Range[len]}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 29 2020 *)
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=Composite(n)%n; write("b065860.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 02 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 26 2001
STATUS
approved