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!)
A241917 If n is a prime with index i, p_i, a(n) = i, (with a(1)=0), otherwise difference (i-j) of the indices of the two largest primes p_i, p_j, i >= j in the prime factorization of n: a(n) = A061395(n) - A061395(A052126(n)). 15
0, 1, 2, 0, 3, 1, 4, 0, 0, 2, 5, 1, 6, 3, 1, 0, 7, 0, 8, 2, 2, 4, 9, 1, 0, 5, 0, 3, 10, 1, 11, 0, 3, 6, 1, 0, 12, 7, 4, 2, 13, 2, 14, 4, 1, 8, 15, 1, 0, 0, 5, 5, 16, 0, 2, 3, 6, 9, 17, 1, 18, 10, 2, 0, 3, 3, 19, 6, 7, 1, 20, 0, 21, 11, 0, 7, 1, 4, 22, 2, 0, 12, 23 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Note: the two largest primes in the multiset of prime divisors of n are equal for all numbers that are in A070003, thus, after a(1)=0, A070003 gives the positions of the other zeros in this sequence. Cf. A241919, A242411 for other variants.
a(A000040(k)) = k.
LINKS
FORMULA
a(n) = A061395(n) - A061395(A052126(n)).
PROG
(Scheme) (define (A241917 n) (- (A061395 n) (A061395 (A052126 n))))
(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
CROSSREFS
Sequence in context: A355528 A277697 A355525 * A355526 A243056 A338568
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 13 2014
STATUS
approved

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 26 05:19 EDT 2024. Contains 371989 sequences. (Running on oeis4.)