The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A266715 Number of k <= floor(n/2) such that (n mod k) is prime. 3
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 1, 1, 3, 2, 1, 4, 3, 3, 3, 3, 3, 8, 2, 3, 6, 7, 2, 7, 4, 6, 6, 7, 4, 10, 2, 8, 9, 9, 3, 10, 6, 11, 6, 10, 4, 17, 4, 7, 10, 12, 6, 15, 5, 13, 7, 13, 9, 19, 3, 13, 12, 17, 3, 17, 7, 18, 11, 13, 7, 21, 7, 17, 12, 20, 4, 23, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,11
LINKS
EXAMPLE
(11 mod k) gives 0,1,2,3,1, with primes 2,3, so a(11) = 2.
MATHEMATICA
t[n_] := Table[Mod[n, k], {k, 1, Floor[n/2]}]
p[n_] := Select[t[n], PrimeQ[#] &]
Table[Length[p[n]], {n, 1, 200}]
PROG
(PARI) a(n) = sum(k=1, n\2, isprime(n % k)); \\ Michel Marcus, Feb 04 2016
CROSSREFS
Sequence in context: A124832 A226130 A137569 * A089177 A348445 A023996
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 03 2016
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 May 14 16:45 EDT 2024. Contains 372533 sequences. (Running on oeis4.)