cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

1, 9988776655443322001, 9988776655443321002, 99887766554433120201, 99887766554433210201, 99887766554433221001, 99887766554433220101, 99887766554433221010, 99887766554433122010, 99887766554433220110, 99887766554433211020, 99887766554433212100, 99887766554433221100, 99887766554433200112
Offset: 0

Views

Author

Zak Seidov and Robert Israel, Jul 20 2023

Keywords

Comments

a(n) = -1 for n sufficiently large, as there are only finitely many numbers with no digits occurring more than twice.
a(n) > 0 for n <= 29.
From Jon E. Schoenfield, Jul 25 2023: (Start)
a(n) = -1 for all n > 65, since no term has more than 20 digits; all 20-digit terms have digit sum 90 and thus are divisible by 9 and can have no more than log_3(9) + floor(log_2(99887766554433221100/9)) = 2 + 63 = 65 prime factors, counted with multiplicity (as 2^64 * 3^2 is a 21-digit number); and no term with fewer than 20 digits can have more than floor(log_2(9988776655443322100)) = 63 prime factors, counted with multiplicity.
a(n) > 0 for n = 0..54, 56, 57, and 62; for all other n, a(n) = -1. (End)

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.
		

Crossrefs

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);

A364040 a(n) is the least positive number with distinct decimal digits and n prime factors, counted with multiplicity, or -1 if there is no such number.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 98304, 327680, 917504, 786432, 1048576, 3145728, 15728640, 31457280, 2845310976, 6398410752, -1, -1, -1, 536870912
Offset: 0

Views

Author

Zak Seidov and Robert Israel, Jul 02 2023

Keywords

Comments

a(n) = -1 for n > 29.

Examples

			a(5) = 32 = 2^5 has distinct decimal digits and 5 prime factors counted with multiplicity.
		

Crossrefs

Cf. A363963.

Programs

  • Maple
    V:= Array(0..29,-1): count:= 0:
    for m from 1 to 10 do
      for L in combinat:-permute([$0..9],m) while count < 27 do
        if L[1] = 0 then next fi;
        x:= add(L[i]*10^(m-i),i=1..m);
        v:= numtheory:-bigomega(x);
        if V[v] = -1 then V[v]:= x; count:= count+1 fi;
      od;
    od:
    convert(V,list);
  • Python
    from sympy import primeomega
    from itertools import count, islice, permutations as P
    def agen(): # generator of terms
        adict, n = dict(), 0
        D = [p for d in range(1, 11) for p in P("0123456789", d) if p[0] != "0"]
        for k in (int("".join(t)) for t in D):
            v = primeomega(k)
            if v not in adict:
                adict[v] = k
                while n in adict: yield adict[n]; n += 1
        yield from (adict[n] if n in adict else -1 for n in count(n))
    print(list(islice(agen(), 22))) # Michael S. Branicky, Apr 05 2024
Showing 1-2 of 2 results.