A364363 a(n) is the greatest number with n prime factors, counted with multiplicity, and no decimal digit occurring more than twice, or -1 if there is no such number.
1, 9988776655443322001, 9988776655443321002, 99887766554433120201, 99887766554433210201, 99887766554433221001, 99887766554433220101, 99887766554433221010, 99887766554433122010, 99887766554433220110, 99887766554433211020, 99887766554433212100, 99887766554433221100, 99887766554433200112
Offset: 0
Examples
a(3) = 99887766554433120201 = 3^2 * 11098640728270346689 has 3 prime factors with multiplicity and each digit 0 to 9 occurs twice, and is the largest such number.
Links
- Jon E. Schoenfield, Table of n, a(n) for n = 0..65
Programs
-
Maple
nextp:= proc(P) local k,m, newP,PL,PG,iv,i; m:= nops(P); for k from m-1 by -1 do if P[k] > P[k+1] then PL,PG:= selectremove(`<`,P[k+1..m],P[k]); iv:= max[index](PL); return [op(P[1..k-1]),PL[iv],op(sort([op(subsop(iv=P[k], PL)),op(PG)],`>`))] fi od end proc: V:= Array(0..21): V[0]:= 1: P:= [seq(i$2,i=9..0,-1)]: count:= 1: while count < 3 do x:= add(P[i]*10^(19-i),i=1..19): w:= numtheory:-bigomega(x); if w <= 2 and V[w] = 0 then V[w]:= x; count:= count+1; fi; P:= nextp(P); od: P:= [seq(i$2,i=9..0,-1)]: while count < 22 do x:= add(P[i]*10^(20-i),i=1..20): w:= numtheory:-bigomega(x); if w <= 21 and V[w] = 0 then V[w]:= x; count:= count+1; fi; P:= nextp(P); od: convert(V,list);
Comments