login
This site is supported by donations 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

Harvey P. Dale, Table of n, a(n) for n = 1..1000

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

Cf. A117078, A117563.

Sequence in context: A209281 A240554 A107338 * A181743 A174737 A131756

Adjacent sequences:  A118120 A118121 A118122 * A118124 A118125 A118126

KEYWORD

nonn

AUTHOR

Rémi Eismann and Robert G. Wilson v, May 12 2006

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 25 03:50 EDT 2019. Contains 321450 sequences. (Running on oeis4.)