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!)
A243055 Difference between the indices of the smallest and the largest prime dividing n: If n = p_i * ... * p_k, where p_i <= ... <= p_k, where p_h = A000040(h), then a(n) = (k-i), a(1) = 0 by convention. 67
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, 2, 0, 0, 3, 6, 1, 1, 0, 7, 4, 2, 0, 3, 0, 4, 1, 8, 0, 1, 0, 2, 5, 5, 0, 1, 2, 3, 6, 9, 0, 2, 0, 10, 2, 0, 3, 4, 0, 6, 7, 3, 0, 1, 0, 11, 1, 7, 1, 5, 0, 2, 0, 12, 0, 3, 4, 13, 8, 4, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
COMMENTS
For n>=1, A100484(n+1) gives the position where n occurs for the first time (setting also the records for the sequence).
a(n) = the difference between the largest and the smallest parts of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(57) = 6; indeed, the partition having Heinz number 57 = 3*19 is [2, 8]. - Emeric Deutsch, Jun 04 2015
LINKS
FORMULA
If n = p_i * ... * p_k, where p_i <= ... <= p_k are not necessarily distinct primes (sorted into nondescending order) in the prime factorization of n, where p_i = A000040(i), then a(n) = (k-i).
a(n) = A061395(n) - A055396(n).
MAPLE
with(numtheory):
a:= n-> `if`(n=1, 0, (f-> pi(max(f[]))-pi(min(f[])))(factorset(n))):
seq(a(n), n=1..100); # Alois P. Heinz, Jun 04 2015
MATHEMATICA
a[1]=0; a[n_] := Function[{f}, PrimePi[Max[f]] - PrimePi[Min[f]]][FactorInteger[n][[All, 1]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 29 2015, after Alois P. Heinz *)
PROG
(Scheme) (define (A243055 n) (- (A061395 n) (A055396 n)))
(Python)
from sympy import primepi, primefactors
def A243055(n): return primepi(max(p:=primefactors(n), default=0))-primepi(min(p, default=0)) # Chai Wah Wu, Oct 10 2023
CROSSREFS
Differs from A242411 for the first time at n=30.
A000961 gives the positions of zeros.
Sequence in context: A297173 A242411 A286470 * A359358 A318371 A363157
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 31 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 09:43 EDT 2024. Contains 371994 sequences. (Running on oeis4.)