login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242411 If n is a prime power, p_i^e, a(n) = 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)). 9

%I #20 May 20 2017 10:22:39

%S 0,0,0,0,0,1,0,0,0,2,0,1,0,3,1,0,0,1,0,2,2,4,0,1,0,5,0,3,0,1,0,0,3,6,

%T 1,1,0,7,4,2,0,2,0,4,1,8,0,1,0,2,5,5,0,1,2,3,6,9,0,1,0,10,2,0,3,3,0,6,

%U 7,1,0,1,0,11,1,7,1,4,0,2,0,12,0,2,4,13,8,4,0

%N If n is a prime power, p_i^e, a(n) = 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)).

%H Antti Karttunen, <a href="/A242411/b242411.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F If A001221(n) = 1, then a(n) = 0, otherwise a(n) = A241919(n) = A061395(n) - A061395(A051119(n)).

%o (Scheme) (define (A242411 n) (if (= 1 (A001221 n)) 0 (- (A061395 n) (A061395 (A051119 n)))))

%o (Haskell)

%o a242411 1 = 0

%o a242411 n = i - j where

%o (i:j:_) = map a049084 $ ps ++ [p]

%o ps@(p:_) = reverse $ a027748_row n

%o -- _Reinhard Zumkeller_, May 15 2014

%o (Python)

%o from sympy import factorint, primefactors, primepi

%o def a061395(n): return 0 if n==1 else primepi(primefactors(n)[-1])

%o def a053585(n):

%o if n==1: return 1

%o p = primefactors(n)[-1]

%o return p**factorint(n)[p]

%o def a051119(n): return n/a053585(n)

%o def a(n): return 0 if n==1 or len(primefactors(n))==1 else a061395(n) - a061395(a051119(n)) # _Indranil Ghosh_, May 19 2017

%Y Cf. A000961 (positions of zeros).

%Y Cf. A241917, A241919, A051119, A061395.

%Y Cf. A049084, A027748.

%K nonn

%O 1,10

%A _Antti Karttunen_, May 13 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)