login
This site is supported by donations 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)). 13
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

Antti Karttunen, Table of n, a(n) for n = 1..10000

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

Cf. A241919, A242411, A052126, A061395, A070003, A122111, A241909.

Cf. A049084, A027746.

Sequence in context: A292803 A292801 A277697 * A243056 A279119 A249738

Adjacent sequences:  A241914 A241915 A241916 * A241918 A241919 A241920

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified January 23 01:55 EST 2018. Contains 298093 sequences.