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!)
A118123 a(n) = number of k's such that prime(n+1) = prime(n) + (prime(n) mod k). 4
0, 0, 1, 0, 2, 1, 3, 2, 1, 3, 1, 2, 3, 2, 1, 1, 3, 2, 4, 3, 1, 4, 3, 3, 2, 5, 4, 7, 6, 2, 2, 2, 7, 2, 5, 2, 1, 2, 3, 1, 3, 3, 7, 6, 7, 2, 1, 2, 8, 7, 1, 3, 5, 4, 1, 1, 3, 2, 6, 5, 5, 3, 2, 3, 2, 2, 4, 2, 7, 6, 1, 6, 2, 1, 6, 3, 2, 2, 2, 5, 3, 2, 7, 3, 6, 3, 6, 2, 7, 6, 5, 2, 6, 5, 10, 3, 2, 3, 2, 2, 2, 3, 1, 9, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
a(n) = # { k>0 | prime(n+1) - prime(n) = prime(n) % k }, where p % k is the remainder of p divided by k.
MATHEMATICA
f[n_] := If[n == 1, 0, Block[{p = Prime@n, np = Prime[n + 1]}, Length@Select[Divisors[2p - np], # >= np - p &]]]; Array[f, 105]
nk[n_]:=Count[Mod[n, Range[n-1]], _?(#==NextPrime[n]-n&)]; nk/@Prime[ Range[ 110]] (* Harvey P. Dale, May 27 2016 *)
PROG
(PARI) A118123(n)={my(d=prime(n+1)-n=prime(n)); sumdiv(n-d, k, k>d)}
CROSSREFS
Sequence in context: A209281 A240554 A107338 * A181743 A330727 A174737
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by M. F. Hasler, Nov 07 2009
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 July 22 12:51 EDT 2024. Contains 374499 sequences. (Running on oeis4.)