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

 


a(n+1) = smallest number >a(n) having more prime factors than a(n), with or without repetitions; a(1)=1.
0

%I #11 Oct 07 2021 09:28:49

%S 1,2,4,6,8,10,12,16,18,24,30,32,33,36,42,48,60,64,65,66,72,78,80,84,

%T 96,102,104,105,108,110,112,114,120,128,129,130,132,144,150,160,165,

%U 168,192,195,196,198,200,204,208,210,216,220,224,228,240,256,258,260

%N a(n+1) = smallest number >a(n) having more prime factors than a(n), with or without repetitions; a(1)=1.

%C A001221(a(n+1))>A001221(a(n)) or A001222(a(n+1))>A001222(a(n)).

%t a[n_] := a[n] = If[n == 1, 1, Module[{k, nu, om}, For[k = a[n-1]+1; nu = PrimeNu[a[n-1]]; om = PrimeOmega[a[n-1]], True, k++, If[PrimeNu[k] > nu || PrimeOmega[k] > om, Return[k]]]]];

%t Array[a, 100] (* _Jean-François Alcover_, Oct 07 2021 *)

%o (Python)

%o from sympy import factorint

%o def aupton(terms):

%o alst, wn, Wn, k = [1], 0, 0, 1

%o while len(alst) < terms:

%o while True:

%o k += 1

%o pf = factorint(k, multiple=True)

%o wk, Wk = len(pf), len(set(pf))

%o if wk > wn or Wk > Wn:

%o break

%o alst.append(k)

%o wn, Wn = wk, Wk

%o return alst

%o print(aupton(58)) # _Michael S. Branicky_, Oct 07 2021

%Y Cf. A001221, A001222.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Aug 10 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 23 18:10 EDT 2024. Contains 376182 sequences. (Running on oeis4.)