login
Nonsquares which are the product of two numbers with the same digits (leading zeros are forbidden).
3

%I #12 Sep 08 2024 09:25:14

%S 252,403,574,736,765,976,1008,1207,1300,1458,1462,1612,1729,1855,1944,

%T 2268,2296,2430,2668,2701,2944,3154,3478,3627,3640,4032,4275,4606,

%U 4930,5092,5605,5848,6624,6786,7663,8722,11110,12240,13390,13552,14560,14803,15750,16074

%N Nonsquares which are the product of two numbers with the same digits (leading zeros are forbidden).

%D P. Vaderlind, R. K. Guy and L. C. Larsen, The Inquisitive Problem Solver, Math. Assoc. Am., 2002, Problem P185.

%H Michael S. Branicky, <a href="/A072443/b072443.txt">Table of n, a(n) for n = 1..10000</a>

%e 12*21 = 252 = 12*21, 403 = 13*31, 574 = 14*41, etc

%o (PARI) {for(n=100,15000,k=floor(log(n)/log(100)); f=divisors(n); v=[]; for(h=1,matsize(f)[2], if(10^k<f[h]&&f[h]<10^(k+1),v=concat(v,f[h]))); b=matsize(v)[2]; if(b>1, w=[]; for(i=1,b,s=[]; a=v[i]; while(a>0,d=divrem(a,10); a=d[1]; s=concat(d[2],s)); w=concat(w,[vecsort(s)])); c=0; for(i=1,b-1, for(j=i+1,b,if(c<1&&w[i]==w[j],if(v[i]*v[j]==n,print1(n,","); c=1))))))}

%o (Python)

%o from math import isqrt

%o from sympy import divisors

%o def ok(n): return isqrt(n)**2<n and any(sorted(str(d)) == sorted(str(n//d)) for d in divisors(n)[1:-1])

%o print([k for k in range(16100) if ok(k)]) # _Michael S. Branicky_, Sep 08 2024

%Y A077760 is a subsequence.

%Y Cf. A076750, A129623.

%K base,nonn

%O 1,1

%A _N. J. A. Sloane_, Nov 11 2002

%E Extended by _Klaus Brockhaus_, Nov 12 2002

%E a(42) and beyond from _Michael S. Branicky_, Sep 08 2024