login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A268372 Number of distinct primes (n mod k) for k=1..floor(n/2). 3
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 1, 1, 1, 1, 1, 3, 2, 2, 1, 2, 1, 4, 2, 3, 2, 4, 2, 4, 2, 3, 2, 3, 2, 5, 2, 5, 3, 4, 3, 6, 2, 5, 2, 5, 2, 6, 2, 5, 3, 6, 3, 7, 3, 6, 3, 7, 4, 8, 3, 7, 4, 7, 3, 8, 2, 8, 4, 7, 4, 9, 3, 8, 4, 8, 4, 9, 2, 9, 5, 8, 5, 9, 3, 8, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,11

LINKS

Clark Kimberling, Table of n, a(n) for n = 1..1000

EXAMPLE

For k=1..15, the numbers (31 mod k) are 0, 1, 1, 3, 1, 1, 3, 7, 4, 1, 9, 7, 5, 3, 1; the primes are 3,3,7,7,5,3, so that a(31) = 3.

MATHEMATICA

t[n_] := Table[Mod[n, k], {k, 1, Floor[n/2]}]

p[n_] := DeleteDuplicates[Select[t[n], PrimeQ[#] &]]

Table[Length[p[n]], {n, 1, 200}]

PROG

(PARI) a(n) = #vecsort(select(x->isprime(x), vector(n\2, k, n % k)), , 8); \\ Michel Marcus, Feb 04 2016

CROSSREFS

Cf. A266714, A266715.

Sequence in context: A070084 A325937 A327167 * A298848 A193518 A060176

Adjacent sequences:  A268369 A268370 A268371 * A268373 A268374 A268375

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 15 17:24 EDT 2019. Contains 328037 sequences. (Running on oeis4.)