|
|
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}.
|
|
20
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
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".
|
|
LINKS
|
|
|
FORMULA
|
For all i, j: A286621(i) = A286621(j) => a(i) = a(j). [Because of the above formula.]
|
|
PROG
|
(Python)
from sympy import primepi, isprime, primefactors, divisors
def a049084(n): return primepi(n)*(1*isprime(n))
def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
def x(n): return 1 if n==1 else divisors(n)[-2]
def a286470(n): return 0 if n==1 or len(primefactors(n))==1 else max(a055396(x(n)) - a055396(n), a286470(x(n)))
def a(n): return max(a055396(n), a286470(n)) # Indranil Ghosh, May 17 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|