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!)
A065862 Remainder when n-th composite number is divided by the number of nonprimes not exceeding n. 1
0, 0, 0, 1, 0, 0, 2, 3, 1, 0, 2, 0, 1, 0, 7, 6, 7, 6, 8, 8, 7, 6, 7, 6, 6, 5, 4, 4, 6, 5, 6, 6, 5, 4, 3, 2, 4, 3, 2, 1, 2, 2, 4, 3, 2, 1, 2, 2, 1, 0, 0, 0, 1, 0, 38, 38, 39, 39, 40, 41, 42, 42, 42, 42, 43, 43, 44, 44, 44, 44, 45, 46, 47, 47, 48, 49, 49, 49, 51, 52, 52, 52, 54, 54, 54, 54, 54 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
LINKS
FORMULA
a(n) = c(n) mod (n - pi(n)) = A002808(n) mod (n - A000720(n)) = A002808(n) mod A062298(n).
MATHEMATICA
Module[{nn=150, cmps, len}, cmps=Select[Range[nn], CompositeQ]; len=Length[ cmps]; Mod[#[[1]], #[[2]]-PrimePi[#[[2]]]]&/@Thread[{cmps, Range[len]}]] (* Harvey P. Dale, Feb 21 2020 *)
PROG
(PARI) Composite(n) = { local(k); k=n + primepi(n) + 1; while (k != n + primepi(k) + 1, k = n + primepi(k) + 1); return(k) } { for (n = 1, 1000, a=Composite(n)%(n - primepi(n)); write("b065862.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 02 2009
CROSSREFS
Sequence in context: A031269 A006703 A133623 * A368495 A189117 A365196
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 April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)