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.
%I A378048 #52 Feb 02 2025 16:30:58 %S A378048 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,20,21,22,23,25,26,27,28, %T A378048 30,31,35,38,40,41,45,46,50,55,56,60,63,64,65,66,68,70,74,75,76,77,80, %U A378048 81,83,85,88,90,91,95,96,97,99,100,101,102,105,109,110 %N A378048 Numbers k such that k and k^2 together use at most 4 distinct decimal digits. %C A378048 Problem: Is there a real constant c such that a(n) < n^c for all positive integers n? %C A378048 All of A136808, A136809, A136816, ..., A137079 are subsequences. Many if not most terms of A058411, A058413, ... ("tridigital solutions") are also in this sequence; see also Hisanori Mishima's web page for some nontrivial solutions. - _M. F. Hasler_, Feb 02 2025 %H A378048 Daniel Mondot, <a href="/A378048/b378048.txt">Table of n, a(n) for n = 1..10000</a> (first 748 terms from Jovan Radenkovicc) %H A378048 M. F. Hasler, <a href="/wiki/Numbers_avoiding_certain_digits">Numbers avoiding certain digits</a>, OEIS wiki, Jan 12 2020 %H A378048 Hisanori Mishima, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/math02/math0210.htm#014">Sporadic tridigital solutions</a> %H A378048 <a href="https://oeis.org/wiki/Index_to_OEIS:_Section_Sq#squares">OEIS index for squares having only given digits</a> %F A378048 A043537(A053061(a(n))) <= 4. %F A378048 Trivially, a(n) >> n^1.66... where the exponent is log(10)/log(4) (A154155). - _Charles R Greathouse IV_, Jan 30 2025 %e A378048 816 is in the sequence since 816^2 = 665856 and both together use at most 4 distinct digits. %e A378048 149 is not in the sequence since 149^2 = 22201 and both together use 5 distinct digits. %t A378048 Select[Range[0, 110], Length[Union @@ IntegerDigits@ {#, #^2}] < 5 &] (* _Amiram Eldar_, Nov 15 2024 *) %o A378048 (Magma) %o A378048 [n: n in [0..1000000] | #Set(Intseq(n)) le 4 and #Set(Intseq(n) cat Intseq(n^2)) le 4]; %o A378048 (PARI) isok(k) = #Set(concat(digits(k), digits(k^2))) <= 4; \\ _Michel Marcus_, Nov 15 2024 %o A378048 (PARI) is(n)=my(s=Set(digits(n))); #s<5 && #setunion(Set(digits(n^2)),s)<5 \\ _Charles R Greathouse IV_, Jan 30 2025 %o A378048 (PARI) is1(n)=#setunion(Set(digits(n^2)),Set(digits(n)))<5 %o A378048 ok(m)=my(d=concat(apply(k->digits(lift(k)), [m,m^2])) %o A378048 test(d)=my(v=List(),D=10^d); for(n=0,D-1, if(ok(Mod(n,D)), listput(v,n))); Vec(v) %o A378048 res=test(8); \\ build a list of residues mod 10^8 %o A378048 D=diff(concat(res,res[1]+10^8)); #D %o A378048 u=List(); for(n=0,10^7, if(is1(n) && !setsearch(n,res), listput(u,n))); \\ build exceptions %o A378048 setminus(select(is1,[0..n]),list(n)) %o A378048 list(lim)=my(v=List(u)); forstep(n=0,lim,D, if(is1(n), listput(v,n))); Vec(v) \\ _Charles R Greathouse IV_, Jan 30 2025 %o A378048 (Python) %o A378048 def ok(n): return len(set(str(n)+str(n**2))) <= 4 %o A378048 print([k for k in range(111) if ok(k)]) # _Michael S. Branicky_, Nov 18 2024 %Y A378048 Supersequence of A136808, A136809, A136816, A136822. %Y A378048 Cf. A043537, A053061, A055436, A154155. %K A378048 nonn,base %O A378048 1,3 %A A378048 _Jovan Radenkovicc_, Nov 15 2024