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 A241919 #17 May 20 2017 10:22:31 %S A241919 0,1,2,1,3,1,4,1,2,2,5,1,6,3,1,1,7,1,8,2,2,4,9,1,3,5,2,3,10,1,11,1,3, %T A241919 6,1,1,12,7,4,2,13,2,14,4,1,8,15,1,4,2,5,5,16,1,2,3,6,9,17,1,18,10,2, %U A241919 1,3,3,19,6,7,1,20,1,21,11,1,7,1,4,22,2,2,12,23 %N A241919 If n is a prime power, p_i^e, a(n) = i, (with a(1)=0), otherwise difference (i-j) of the indices of the two largest distinct primes p_i, p_j, i > j in the prime factorization of n: a(n) = A061395(n) - A061395(A051119(n)). %C A241919 See A242411 and A241917 for other variants. %H A241919 Antti Karttunen, <a href="/A241919/b241919.txt">Table of n, a(n) for n = 1..10000</a> %F A241919 a(n) = A061395(n) - A061395(A051119(n)). %o A241919 (Scheme) (define (A241919 n) (- (A061395 n) (A061395 (A051119 n)))) %o A241919 (Haskell) %o A241919 a241919 1 = 0 %o A241919 a241919 n = i - j where %o A241919 (i:j:_) = map a049084 $ reverse (1 : a027748_row n) %o A241919 -- _Reinhard Zumkeller_, May 15 2014 %o A241919 (Python) %o A241919 from sympy import factorint, primefactors, primepi %o A241919 def a061395(n): return 0 if n==1 else primepi(primefactors(n)[-1]) %o A241919 def a053585(n): %o A241919 if n==1: return 1 %o A241919 p = primefactors(n)[-1] %o A241919 return p**factorint(n)[p] %o A241919 def a051119(n): return n/a053585(n) %o A241919 def a(n): return a061395(n) - a061395(a051119(n)) # _Indranil Ghosh_, May 19 2017 %Y A241919 Cf. A241917, A242411, A051119, A061395, A122111. %Y A241919 Cf. A049084, A027748. %K A241919 nonn %O A241919 1,3 %A A241919 _Antti Karttunen_, May 13 2014