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 A300820 #12 Mar 22 2018 17:56:43 %S A300820 0,1,1,1,1,2,1,1,1,1,1,2,1,1,2,1,1,2,1,1,1,1,1,2,1,1,1,1,1,3,1,1,1,1, %T A300820 2,2,1,1,1,1,1,2,1,1,2,1,1,2,1,1,1,1,1,2,1,1,1,1,1,3,1,1,1,1,1,2,1,1, %U A300820 1,2,1,2,1,1,2,1,2,2,1,1,1,1,1,2,1,1,1,1,1,3,1,1,1,1,1,2,1,1,1,1,1,2,1,1,3 %N A300820 Length of the longest sequence of consecutive primes in the prime factorization of n. a(1) = 0. %H A300820 Antti Karttunen, <a href="/A300820/b300820.txt">Table of n, a(n) for n = 1..65537</a> %H A300820 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %F A300820 For n > 1, a(n) = A038374(A087207(n)). %F A300820 For n >= 0, a(A002110(n)) = n. [Primorials give the positions of the records = the first occurrence of each n.] %e A300820 For n = 350 = 2 * 5^2 * 7 = prime(1) * prime(3)^2 * prime(4), the longest stretch of consecutive primes is from prime(3) to prime(4), with length 2, thus a(350) = 2. %o A300820 (PARI) A300820(n) = if(omega(n)<=1, omega(n), my(pis=apply(p->primepi(p),factor(n)[,1]),el=1,m=1); for(i=2,#pis,if(pis[i] == (1+pis[i-1]),el++; m = max(m,el), el=1)); (m)); %o A300820 (PARI) a(n) = {if(n == 1, return(0)); my(res = 1, f = factor(n)[, 1]~, t = 1); %o A300820 for(i = 1, #f - 1, if(f[i+1]==nextprime(f[i]+1), t++, res = max(res, t); t = 1)); max(res, t)} \\ _David A. Corneth_, Mar 21 2018 %Y A300820 Cf. A038374, A087207, A104210 (positions of terms > 1), A296210. %Y A300820 Cf. also A167447. %K A300820 nonn %O A300820 1,6 %A A300820 _Antti Karttunen_, Mar 21 2018