This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A118123 #12 May 27 2016 14:27:36 %S A118123 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, %T A118123 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, %U A118123 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 %N A118123 a(n) = number of k's such that prime(n+1) = prime(n) + (prime(n) mod k). %H A118123 Harvey P. Dale, <a href="/A118123/b118123.txt">Table of n, a(n) for n = 1..1000</a> %F A118123 a(n) = # { k>0 | prime(n+1) - prime(n) = prime(n) % k }, where p % k is the remainder of p divided by k. %t A118123 f[n_] := If[n == 1, 0, Block[{p = Prime@n, np = Prime[n + 1]}, Length@Select[Divisors[2p - np], # >= np - p &]]]; Array[f, 105] %t A118123 nk[n_]:=Count[Mod[n,Range[n-1]],_?(#==NextPrime[n]-n&)]; nk/@Prime[ Range[ 110]] (* _Harvey P. Dale_, May 27 2016 *) %o A118123 (PARI) A118123(n)={my(d=prime(n+1)-n=prime(n)); sumdiv(n-d,k,k>d)} %Y A118123 Cf. A117078, A117563. %K A118123 nonn %O A118123 1,5 %A A118123 _Rémi Eismann_ and _Robert G. Wilson v_, May 12 2006 %E A118123 Edited by _M. F. Hasler_, Nov 07 2009