cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A073454 Number of repeated remainders arising when n is divided by all primes up to n: a(n) = pi(n) - A073453(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 3, 3, 3, 2, 2, 2, 2, 1, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 4, 3, 3, 2, 3, 2, 2, 2, 2, 2, 3
Offset: 1

Views

Author

Labos Elemer, Aug 02 2002

Keywords

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

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[w]-Length[Union[Table[Mod[w, Prime[j]], {j, 1, PrimePi[w]}]]], {w, 1, 256}]
  • PARI
    a(n) = my(P=primes([2, n])); #P - #Set(apply(p->n%p, P)) \\ Charles R Greathouse IV, Jun 17 2016

Formula

See program below.

Extensions

New name from Charles R Greathouse IV, Jun 17 2016