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.

A247047 Numbers k such that k^2 contains exactly 2 distinct digits and k^3 contains exactly 3 distinct digits.

This page as a plain text file.
%I A247047 #26 Jun 05 2025 09:51:54
%S A247047 5,6,8,9,15,30,173,300,3000,30000,300000,3000000,30000000,300000000,
%T A247047 3000000000,30000000000,300000000000,3000000000000,30000000000000,
%U A247047 300000000000000,3000000000000000
%N A247047 Numbers k such that k^2 contains exactly 2 distinct digits and k^3 contains exactly 3 distinct digits.
%C A247047 Intersection of A016069 and A155146.
%C A247047 This sequence is infinite since 3*10^k is always in this sequence for k > 0.
%C A247047 Is 173 the last term not of the form 3*10^k?
%C A247047 3*10^7 < a(14) <= 3*10^8.
%C A247047 The numbers k such that k^2 contains 2 distinct digits, k^3 contains 3 distinct digits, and k^4 contains 4 distinct digits are conjectured to only be 6, 8, and 15. (Intersection of A016069, A155146, and A155150.)
%e A247047 k = 15 is a member of this sequence since 15^2 = 225 contains two distinct digits and 15^3 = 3375 contains three distinct digits.
%t A247047 Select[Range[3*10^6],Length[DeleteCases[DigitCount[#^2],0]]==2&&Length[ DeleteCases[ DigitCount[#^3],0]]==3&] (* The program generates the first 12 terms of the sequence. *) (* _Harvey P. Dale_, Jan 21 2023 *)
%o A247047 (PARI)
%o A247047 for(n=1,3*10^7,d2=digits(n^2);d3=digits(n^3);if(#vecsort(d2,,8)==2&&#vecsort(d3,,8)==3,print1(n,", ")))
%o A247047 (Python)
%o A247047 A247047_list = [n for n in range(1,10**6) if len(set(str(n**3))) == 3 and len(set(str(n**2))) == 2]
%o A247047 # _Chai Wah Wu_, Sep 26 2014
%Y A247047 Cf. A016069, A155146.
%K A247047 nonn,base,more
%O A247047 1,1
%A A247047 _Derek Orr_, Sep 10 2014
%E A247047 a(14)-a(15) from _Chai Wah Wu_, Sep 26 2014
%E A247047 a(16)-a(18) from _Kevin P. Thompson_, Jul 01 2022
%E A247047 a(19)-a(21) from _Michael S. Branicky_, Jun 05 2025