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-1 of 1 results.

A369203 a(n) is the first number that has exactly n anagrams that each have exactly n prime divisors, counted by multiplicity.

Original entry on oeis.org

2, 15, 117, 135, 1224, 10023, 10026, 50688, 104445, 100368, 1012257, 1002258, 1034568, 10027899, 10024569, 100002789, 100234566, 100236789, 1000024569, 1012566789, 10000224468, 10002367899, 10002345678, 100012344588, 100012234689, 100223456778, 1000012457889, 1002345566778
Offset: 1

Views

Author

Robert Israel, Jan 15 2024

Keywords

Comments

a(n) is the first number that has n anagrams k such that A001222(k) = n.
Does 9 divide a(n) for n > 6? - David A. Corneth, Jan 16 2024

Examples

			a(4) = 135 is a term because 135 has 4 anagrams having 4 prime divisors, counted by multiplicity: 135 = 3^3 * 5, 315 = 3^2 * 5 * 7, 351 = 3^3 * 13 and 513 == 3^3 * 19, and no number < 135 works.
a(6) != 2367 because 2367 has exactly 7 anagrams with each having exactly 6 prime divisors (namely 2673, 3276, 3726, 6237, 6372, 6732, 7236). - _David A. Corneth_, Jan 16 2024
		

Crossrefs

Cf. A001222, A369184. All terms are in A179239.

Programs

  • Maple
    f:= proc(n) # numbers k such that n has k anagrams with Omega = k
            local L, W,WS,V,d, w, x, i;
          L:= convert(n, base, 10); d:= nops(L);
          L:= select(t -> t[-1] <> 0, combinat:-permute(L));
          L:= map(t-> add(t[i]*10^(i-1), i=1..d), L);
          W:= map(t -> numtheory:-bigomega(t), L);
          WS:= convert(W,set);
          for x in WS do V[x]:= 0 od;
          for x in W do V[x]:= V[x]+1 od;
          select(x -> V[x] = x, WS);
    end proc:
    g:= proc(xin,d,n) # first anagrams with n digits starting xin, all other digits >= d
      option remember;
      local i;
      if 1 + ilog10(xin) = n then return xin fi;
      seq(procname(10*xin+i,i,n), i=d..9)
    end proc:
    h:= proc(n) # first anagrams with n digits
      local i,j;
      seq(seq(g(i*10^j,i,n),j=n-1..0,-1),i=1..9)
    end proc:
    V:= 'V': m:= 0:
    for d from 1 to 9 do
      for x in h(d) do
        for y in f(x) do
          if not assigned(V[y]) then V[y]:= x: m:= max(m,y) fi
    od od od:
    seq(V[y],y=1..m);
  • Python
    from collections import Counter
    from sympy import primeomega as W
    from sympy.utilities.iterables import multiset_permutations as MP
    from itertools import combinations_with_replacement, count, islice
    def counteq(n):
        c = Counter(W(int("".join(p))) for p in MP(str(n)) if p[0]!='0')
        return [i for i in c if c[i] == i]
    def agen(): # generator of terms
        adict, n = dict(), 1
        for d in count(len(str(2**n))):
            for f in "123456789":
                for r in combinations_with_replacement("0123456789", d-1):
                    k = int(f+"".join(r))
                    for v in counteq(k):
                        if v not in adict:
                            adict[v] = k
                    while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 8))) # Michael S. Branicky, Jan 16 2024

Extensions

More terms from David A. Corneth, Jan 16 2024
Showing 1-1 of 1 results.