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.

Showing 1-3 of 3 results.

A274320 Least inverse of A073454: Smallest m such that m divided by the primes up to m have exactly n repeated residues.

Original entry on oeis.org

6, 15, 35, 95, 187, 259, 671, 903, 905, 1273, 1967, 2938, 3161, 4382, 6004, 6005, 9718, 11049, 12371, 14194, 16181, 17285, 20842, 27242, 27257, 31937, 35758, 35767, 50407, 54071, 56345, 59917, 59923, 75898, 86833, 86839, 106999, 116651, 116653, 134027, 134034, 134041, 156138, 171613, 173499, 188170, 194554, 194555, 228122, 253291, 253327, 260374, 302371, 302395, 302396, 346837, 368983, 376262, 376267, 376268, 376270
Offset: 1

Views

Author

Keywords

Comments

Trivially a(n) >= prime(n+1). I would like to see a better lower bound.

Examples

			The primes up to 15 are (2, 3, 5, 7, 11, 13) and 15 mod each of these primes leaves residues of (1, 0, 0, 1, 4, 2). There are two duplicates (1 appears twice and so does 0) and no smaller number has this property, so a(2) = 15.
		

Crossrefs

Programs

  • PARI
    a(n)=my(P=List(),m=1); while(#P-#Set(apply(p->m%p, P)) != n, if(isprime(m++), listput(P,m))); m

A073453 Number of distinct remainders arising when n is divided by all primes up to n.

Original entry on oeis.org

0, 1, 2, 2, 3, 2, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 6, 6, 7, 7, 6, 6, 7, 8, 8, 8, 8, 8, 9, 8, 9, 10, 10, 9, 8, 9, 10, 10, 9, 10, 11, 11, 12, 12, 12, 12, 13, 14, 14, 14, 13, 13, 14, 15, 14, 14, 13, 13, 14, 15, 16, 16, 16, 17, 16, 15, 16, 16, 16, 16, 17, 18, 19, 19, 19, 19, 18, 18, 19, 19, 20
Offset: 1

Views

Author

Labos Elemer, Aug 02 2002

Keywords

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) = 8.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Union[Table[Mod[w, Prime[j]], {j, 1, PrimePi[w]}]]], {w, 1, 256}]
    Table[Length[Union[Mod[n,Prime[Range[PrimePi[n]]]]]],{n,100}] (* Harvey P. Dale, Jul 04 2021 *)
  • PARI
    a(n) = #Set(vector(primepi(n), k, n % prime(k))); \\ Michel Marcus, May 28 2016
    
  • PARI
    a(n) = #Set(apply(p->n%p, primes([2,n]))) \\ Charles R Greathouse IV, Jun 17 2016

Formula

See program below.
a(n) = n + 1 - Sum_{k=1..n-1} ( floor((k-1)!^(n-1)/(n-k+1))-floor(((k-1)!^(n-1)-1)/(n-k+1)) ). - Anthony Browne, May 27 2016

A073464 a(n) = phi(n) mod PrimePi(n).

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 0, 2, 0, 0, 4, 0, 0, 2, 2, 2, 6, 2, 0, 4, 2, 4, 8, 2, 3, 0, 3, 8, 8, 8, 5, 9, 5, 2, 1, 0, 6, 0, 4, 1, 12, 0, 6, 10, 8, 1, 1, 12, 5, 2, 9, 4, 2, 8, 8, 4, 12, 7, 16, 6, 12, 0, 14, 12, 2, 9, 13, 6, 5, 10, 4, 9, 15, 19, 15, 18, 3, 12, 10, 10, 18, 13, 1, 18, 19, 10, 17, 16, 0, 0, 20, 12
Offset: 2

Views

Author

Labos Elemer, Aug 02 2002

Keywords

Crossrefs

Programs

  • Magma
    [EulerPhi(n) mod #PrimesUpTo(n): n in [2..100]]; // Vincenzo Librandi, Dec 11 2018
  • Mathematica
    a(n)=Table[Mod[EulerPhi[w], PrimePi[w]], {w, 2, 1000}]
  • PARI
    a(n) = eulerphi(n) % primepi(n); \\ Michel Marcus, Dec 11 2018
    

Formula

a(n) = A000010(n) mod A000720(n).
Showing 1-3 of 3 results.