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
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
(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
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 31 2014
STATUS
approved