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 A286469 #20 Jul 09 2025 04:19:14 %S A286469 0,1,2,1,3,1,4,1,2,2,5,1,6,3,2,1,7,1,8,2,2,4,9,1,3,5,2,3,10,1,11,1,3, %T A286469 6,3,1,12,7,4,2,13,2,14,4,2,8,15,1,4,2,5,5,16,1,3,3,6,9,17,1,18,10,2, %U A286469 1,3,3,19,6,7,2,20,1,21,11,2,7,4,4,22,2,2,12,23,2,4,13,8,4,24,1,4,8,9,14,5,1,25,3,3,2,26,5,27,5,2,15,28,1,29,2,10,3 %N A286469 a(n) = maximum of {the index of least prime dividing n} and {the maximal gap between indices of the successive primes in the prime factorization of n}. %C A286469 This gives the maximal gap between the indices of successive prime factors p_i <= p_j <= ... <= p_k of n = p_i * p_j * ... * p_k when the index of the least prime factor p_i (A055396) is considered as the initial gap from the "level zero". %H A286469 Antti Karttunen, <a href="/A286469/b286469.txt">Table of n, a(n) for n = 1..10000</a> %F A286469 a(n) = max(A055396(n), A286470(n)). %F A286469 a(n) = A051903(A122111(n)). %F A286469 For all i, j: A286621(i) = A286621(j) => a(i) = a(j). [Because of the above formula.] %o A286469 (Scheme) (define (A286469 n) (max (A055396 n) (A286470 n))) %o A286469 (Python) %o A286469 from sympy import primepi, isprime, primefactors, divisors %o A286469 def a049084(n): return primepi(n)*(1*isprime(n)) %o A286469 def a055396(n): return 0 if n==1 else a049084(min(primefactors(n))) %o A286469 def x(n): return 1 if n==1 else divisors(n)[-2] %o A286469 def a286470(n): return 0 if n==1 or len(primefactors(n))==1 else max(a055396(x(n)) - a055396(n), a286470(x(n))) %o A286469 def a(n): return max(a055396(n), a286470(n)) # _Indranil Ghosh_, May 17 2017 %Y A286469 Cf. A051903, A055396, A122111, A286470, A286621. %K A286469 nonn %O A286469 1,3 %A A286469 _Antti Karttunen_, May 14 2017 %E A286469 Definition corrected May 17 2017