OFFSET
1,15
COMMENTS
Records: a(1) = 0, a(6) = 1, a(15) = 2, a(35) = 3, a(95) = 4, a(187) = 5, a(259) = 6, a(671) = 7, a(903) = 8, a(905) = 9, a(1273) = 10, a(1967) = 11, a(2938) = 12, a(3161) = 13, a(4382) = 14, a(6004) = 15, a(6005) = 16, a(9718) = 17, a(11049) = 18, a(12371) = 19, a(14194) = 20, a(16181) = 21, a(17285) = 22, a(20842) = 23, a(27242) = 24, a(27257) = 25, a(31937) = 26, a(35758) = 27, a(35767) = 28, a(50407) = 29, a(54071) = 30, a(56345) = 31, a(59917) = 32, a(59923) = 33, a(75898) = 34. - Charles R Greathouse IV, Jun 17 2016
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
See program below.
EXAMPLE
n=25: Primes are (2,3,5,7,11,13,17,19,23), remainders are (1,1,0,4,3,12,8,6,2), distinct remainders are {0,1,2,3,4,6,8,12} which has 8 members, so a(25) = 9 - 8 = 1.
MATHEMATICA
Table[PrimePi[w]-Length[Union[Table[Mod[w, Prime[j]], {j, 1, PrimePi[w]}]]], {w, 1, 256}]
PROG
(PARI) a(n) = my(P=primes([2, n])); #P - #Set(apply(p->n%p, P)) \\ Charles R Greathouse IV, Jun 17 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 02 2002
EXTENSIONS
New name from Charles R Greathouse IV, Jun 17 2016
STATUS
approved