OFFSET
1,3
COMMENTS
LINKS
PROG
(Haskell)
a241917 n = i - j where
(i:j:_) = map a049084 $ reverse (1 : a027746_row n)
-- Reinhard Zumkeller, May 15 2014
(Python)
from sympy import primefactors, primepi
def a061395(n): return 0 if n==1 else primepi(primefactors(n)[-1])
def a052126(n): return 1 if n==1 else n/primefactors(n)[-1]
def a(n): return 0 if n==1 else a061395(n) - a061395(a052126(n)) # Indranil Ghosh, May 19 2017
(PARI) A241917(n) = if(isprime(n), primepi(n), if(1>=omega(n), 0, my(f=factor(n)); if(f[#f~, 2]>1, 0, primepi(f[#f~, 1])-primepi(f[(#f~)-1, 1])))); \\ Antti Karttunen, Jul 10 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 13 2014
STATUS
approved