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.

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

This page as a plain text file.
%I A073453 #18 Jul 04 2021 11:51:21
%S A073453 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,
%T A073453 9,8,9,10,10,9,10,11,11,12,12,12,12,13,14,14,14,13,13,14,15,14,14,13,
%U A073453 13,14,15,16,16,16,17,16,15,16,16,16,16,17,18,19,19,19,19,18,18,19,19,20
%N A073453 Number of distinct remainders arising when n is divided by all primes up to n.
%H A073453 Michel Marcus, <a href="/A073453/b073453.txt">Table of n, a(n) for n = 1..1000</a>
%F A073453 See program below.
%F A073453 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
%e A073453 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.
%t A073453 Table[Length[Union[Table[Mod[w, Prime[j]], {j, 1, PrimePi[w]}]]], {w, 1, 256}]
%t A073453 Table[Length[Union[Mod[n,Prime[Range[PrimePi[n]]]]]],{n,100}] (* _Harvey P. Dale_, Jul 04 2021 *)
%o A073453 (PARI) a(n) = #Set(vector(primepi(n), k, n % prime(k))); \\ _Michel Marcus_, May 28 2016
%o A073453 (PARI) a(n) = #Set(apply(p->n%p, primes([2,n]))) \\ _Charles R Greathouse IV_, Jun 17 2016
%Y A073453 Cf. A072530, A072531, A073454, A000720.
%K A073453 nonn
%O A073453 1,3
%A A073453 _Labos Elemer_, Aug 02 2002