|
|
A111700
|
|
Number of integers between p(n) and p(n+1) which are coprime to (p(n+1)-p(n)), where p(n) is the n-th prime.
|
|
0
|
|
|
0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 3, 1, 0, 1, 0, 1, 5, 1, 1, 0, 3, 0, 1, 1, 1, 1, 1, 0, 3, 0, 1, 0, 3, 3, 1, 0, 1, 1, 0, 3, 1, 1, 1, 0, 1, 1, 0, 3, 5, 1, 0, 1, 5, 1, 3, 0, 1, 1, 3, 1, 1, 1, 1, 3, 1, 3, 3, 0, 3, 0, 1, 1, 1, 3, 1, 0, 1, 3, 3, 1, 3, 1, 1, 3, 0, 5, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,24
|
|
LINKS
|
|
|
FORMULA
|
a(n) = phi(p(n+1)-p(n)) - 1, where phi(n) = A000010(n).
|
|
EXAMPLE
|
Between the primes p(24) = 89 and p(25) = 97 are 3 integers (91, 93 and 95) which are coprime to (p(25)-p(24)) = 8, so a(24) = 3.
|
|
MATHEMATICA
|
|
|
PROG
|
(MuPAD) for n from 2 to 100 do a := ithprime(n); b := nextprime(a+1); su := 0; for k from a+1 to b-1 do if gcd(k, (b-a)) = 1 then su := su+1; end_if; end_for; print(su); end_for; // Stefan Steinerberger
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|