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 A278500 #19 Dec 03 2016 12:24:44 %S A278500 1,2,0,2,0,1,0,0,0,1,0,3,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0, %T A278500 0,3,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,2,0,0,0,0,0,1,0,0, %U A278500 0,1,0,2,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0 %N A278500 a(n) = largest k such that n+1 = a prime, n+2 = 2 * a prime, ..., n+k is k times a prime, a(n) = 0 if n+1 is not a prime. %C A278500 First 4 occurs at n=12720, first 5 occurs at n=19440. See A074200. %H A278500 Antti Karttunen, <a href="/A278500/b278500.txt">Table of n, a(n) for n = 1..21000</a> %e A278500 a(12) = 3 as 13 = 1*prime, 14 = 2*prime, 15 = 3*prime. %t A278500 Table[If[CompositeQ[n + 1], 0, k = 1; While[Times @@ Boole@ Map[PrimeQ, MapIndexed[#1/First@ #2 &, (n + Range@ k)]] == 1, k++]; k - 1], {n, 120}] (* _Michael De Vlieger_, Dec 01 2016 *) %o A278500 (PARI) %o A278500 A278500(n) = { my(k=1); while((!((n+k)%k) && isprime((n+k)/k)), k = k+1); (k-1); } %o A278500 for(n=1, 2^20, write("b278500.txt", n, " ", A278500(n))); %o A278500 (Scheme) (define (A278500 n) (let loop ((k 1)) (let ((h (/ (+ n k) k))) (if (or (not (integer? h)) (zero? (A010051 h))) (- k 1) (loop (+ 1 k)))))) %Y A278500 Cf. A072668 (positions of zeros), A006093 (nonzeros), A089965 (positions of terms >= 2), A278583 (of terms >= 3), A278585 (of terms >= 4). %Y A278500 Cf. A074200 (position of the first term >= n). %K A278500 nonn %O A278500 1,2 %A A278500 _Antti Karttunen_, Nov 30 2016