login
Numbers k such that at least one other integer m exists with the same smallest and same largest prime factors, and same multisets of decimal and binary digits as k.
3

%I #23 May 12 2025 19:26:01

%S 1080,1260,1800,2016,2673,3024,3267,3402,4032,4500,4653,4950,5346,

%T 5400,5670,5757,5940,6048,6345,6534,6804,7056,7560,7575,8064,11084,

%U 11542,12654,12915,13026,13068,13260,13860,14018,14490,14652,14904,15124,15129,16032,16320

%N Numbers k such that at least one other integer m exists with the same smallest and same largest prime factors, and same multisets of decimal and binary digits as k.

%C Decimal digits of m are a permutation of decimal digits of k,

%C binary digits of m are a permutation of binary digits of k.

%C Conjecture: there is X such that among integers bigger than X more than 50% are in the sequence.

%H Robert Israel, <a href="/A214621/b214621.txt">Table of n, a(n) for n = 1..10000</a>

%e 1080 and 1800 have the same set of decimal digits, same set of binary digits (10000111000 versus 11100001000), same smallest prime factor 2, and same largest prime factor 5.

%p Res:= {}:

%p for n from 1 to 2^16-1 do

%p f:= numtheory:-factorset(n);

%p v:= [min(f),max(f),ilog2(n), convert(convert(n,base,2),`+`),sort(convert(n,base,10))];

%p if assigned(R[v]) then

%p Res:= Res union {n, R[v]}

%p else

%p R[v]:= n

%p fi

%p od:

%p sort(convert(Res,list)); # _Robert Israel_, Sep 28 2018

%o (Python)

%o from collections import defaultdict

%o from sympy import factorint

%o def a(up_to):

%o # up_to should be a power of 2 or 10.

%o dic = defaultdict(list)

%o for n in range(2, up_to):

%o digit_multiset = tuple(sorted(str(n)))

%o bit_count = n.bit_count()

%o bit_length = n.bit_length()

%o factors = factorint(n)

%o least_prime_factor = min(factors)

%o greatest_prime_factor = max(factors)

%o key = (digit_multiset, bit_count, bit_length, least_prime_factor, greatest_prime_factor)

%o dic[key].append(n)

%o return sorted(n for n_list in dic.values() if len(n_list) > 1 for n in n_list)

%o print(*a(2**14), sep=', ')

%o # _David Radcliffe_, May 11 2025

%Y Cf. A214619, A214620.

%K nonn,base

%O 1,1

%A _Alex Ratushnyak_, Jul 23 2012