login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065864 Remainder when n is divided by the number of nonprimes not exceeding n. 7
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, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,9
LINKS
FORMULA
a(n) = n mod (n-pi(n)) = n mod (n-A000720(n)) = n mod A062298(n).
EXAMPLE
For n=100, pi(100)=25, so a(100) = 100 mod (100-25) = 25.
MATHEMATICA
Table[Mod[n, n - PrimePi@ n], {n, 78}] (* or *)
Table[Mod[n, Count[Range@ n, k_ /; ! PrimeQ@ k]], {n, 78}] (* Michael De Vlieger, Jan 01 2017 *)
PROG
(PARI) { for (n = 1, 1000, a=n%(n - primepi(n)); write("b065864.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 02 2009
CROSSREFS
Sequence in context: A244234 A237449 A003869 * A120205 A257291 A152465
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 26 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 20 23:19 EDT 2024. Contains 375341 sequences. (Running on oeis4.)