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.

A369184 a(n) is the first positive number that has exactly n anagrams which have 3 prime divisors, counted by multiplicity, or 0 if there is no such number.

This page as a plain text file.
%I A369184 #14 Jan 20 2024 09:25:17
%S A369184 1,8,103,117,156,268,1038,1027,1059,1246,1245,1347,1578,3789,10136,
%T A369184 10126,10234,10355,10157,10236,10158,11456,10247,10245,10289,10237,
%U A369184 10235,10347,10256,10257,10246,10789,10239,10579,12567,10578,13457,12369,14559,12458,12579,23789,24789,12459,100258,12345
%N A369184 a(n) is the first positive number that has exactly n anagrams which have 3 prime divisors, counted by multiplicity, or 0 if there is no such number.
%C A369184 An anagram of a number k is a permutation of the base-10 digits of k with no leading 0's.
%C A369184 a(n) is the first k such that A175854(k) = n, or 0 if n is not a term of A175854.
%C A369184 Conjecture: all a(n) > 0.
%H A369184 Robert Israel, <a href="/A369184/b369184.txt">Table of n, a(n) for n = 0..1000</a>
%e A369184 a(5) = 268 because 268 has 5 anagrams that have 3 prime divisors, counted by multiplicity, and is the first number that does that:
%e A369184 268 = 2^2 * 67, 286 = 2 * 11 * 13, 628 = 2^2 * 157, 682 = 2 * 11 * 31, 826 = 2 * 7 * 59.
%p A369184 f:= proc(n) local L, d, w, x, i;
%p A369184       L:= convert(n, base, 10); d:= nops(L);
%p A369184       L:= select(t -> t[-1] <> 0, combinat:-permute(L));
%p A369184       L:= map(t-> add(t[i]*10^(i-1), i=1..d), L);
%p A369184       nops(select(t -> numtheory:-bigomega(t)=3, L))
%p A369184 end proc:
%p A369184 g:= proc(xin,d,n) # first anagrams with n digits starting xin, all other digits >= d
%p A369184   option remember;
%p A369184   local i;
%p A369184   if 1 + ilog10(xin) = n then return xin fi;
%p A369184   seq(procname(10*xin+i,i,n), i=d..9)
%p A369184 end proc:
%p A369184 h:= proc(n) # first anagrams with n digits
%p A369184   local i,j;
%p A369184   seq(seq(g(i*10^j,i,n),j=n-1..0,-1),i=1..9)
%p A369184 end proc:
%p A369184 N:= 100: # for a(0) .. a(N)
%p A369184 V:= Array(0..N): count:= 0:
%p A369184 for i from 1 while count < N+1 do
%p A369184   for x in [h(i)] while count < N+1 do
%p A369184     v:= f(x);
%p A369184     if v <= N and V[v] = 0 then V[v]:= x; count:= count+1; fi
%p A369184   od
%p A369184 od:
%p A369184 convert(V,list);
%o A369184 (Python)
%o A369184 from sympy import primeomega
%o A369184 from sympy.utilities.iterables import multiset_permutations
%o A369184 from itertools import combinations_with_replacement, count, islice
%o A369184 def func(n): return sum(1 for p in multiset_permutations(str(n)) if p[0]!='0' and primeomega(int("".join(p)))==3)
%o A369184 def agen(): # generator of terms
%o A369184     adict, n = dict(), 0
%o A369184     for d in count(1):
%o A369184         for f in "123456789":
%o A369184             for r in combinations_with_replacement("0123456789", d-1):
%o A369184                 k = int(f+"".join(r))
%o A369184                 v = func(k)
%o A369184                 if v not in adict:
%o A369184                     adict[v] = k
%o A369184                     while n in adict: yield adict[n]; n += 1
%o A369184 print(list(islice(agen(), 44))) # _Michael S. Branicky_, Jan 15 2024
%Y A369184 Cf. A014612, A175854. All terms are in A179239.
%K A369184 nonn,base
%O A369184 0,2
%A A369184 _Robert Israel_, Jan 15 2024