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.

A065864 Remainder when n is divided by the number of nonprimes not exceeding n.

This page as a plain text file.
%I A065864 #16 Jan 02 2017 02:10:32
%S A065864 0,0,0,0,1,0,1,0,4,4,5,5,6,6,6,6,7,7,8,8,8,8,9,9,9,9,9,9,10,10,11,11,
%T A065864 11,11,11,11,12,12,12,12,13,13,14,14,14,14,15,15,15,15,15,15,16,16,16,
%U A065864 16,16,16,17,17,18,18,18,18,18,18,19,19,19,19,20,20,21,21,21,21,21,21
%N A065864 Remainder when n is divided by the number of nonprimes not exceeding n.
%H A065864 Harry J. Smith, <a href="/A065864/b065864.txt">Table of n, a(n) for n = 1..1000</a>
%F A065864 a(n) = n mod (n-pi(n)) = n mod (n-A000720(n)) = n mod A062298(n).
%e A065864 For n=100, pi(100)=25, so a(100) = 100 mod (100-25) = 25.
%t A065864 Table[Mod[n, n - PrimePi@ n], {n, 78}] (* or *)
%t A065864 Table[Mod[n, Count[Range@ n, k_ /; ! PrimeQ@ k]], {n, 78}] (* _Michael De Vlieger_, Jan 01 2017 *)
%o A065864 (PARI) { for (n = 1, 1000, a=n%(n - primepi(n)); write("b065864.txt", n, " ", a) ) } \\ _Harry J. Smith_, Nov 02 2009
%Y A065864 Cf. A000040, A004648, A062298, A065133, A065134, A065858-A065864.
%K A065864 nonn
%O A065864 1,9
%A A065864 _Labos Elemer_, Nov 26 2001