The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A016069 Numbers n such that n^2 contains exactly 2 different digits. 17
 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 20, 21, 22, 26, 30, 38, 88, 100, 109, 173, 200, 212, 235, 264, 300, 1000, 2000, 3000, 3114, 10000, 20000, 30000, 81619, 100000, 200000, 300000, 1000000, 2000000, 3000000, 10000000, 20000000 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 REFERENCES R. K. Guy, Unsolved Problems in Number Theory, F24. LINKS Robert G. Wilson v, Table of n, a(n) for n = 1..81 Eric Weisstein's World of Mathematics, Square Number EXAMPLE 26 is in the sequence because 26^2 = 676 contains exactly 2 different digits. MATHEMATICA Join[Select[Range[90000], Count[DigitCount[#^2], _?(#!=0&)]==2&], Flatten[ NestList[ 10#&, {100000, 200000, 300000}, 5]]] (* Harvey P. Dale, Mar 09 2013 *) Select[Range[20000000], Length[Union[IntegerDigits[#^2]]]==2&] (* Vincenzo Librandi, Nov 04 2014 *) PROG (Haskell) import Data.List (nub) a016069 n = a016069_list !! (n-1) a016069_list = filter ((== 2) . length . nub . show . (^ 2)) [0..] -- Reinhard Zumkeller, Apr 14 2011 (PARI) /* needs version >= 2.6 */ for (n=1, 10^9, if ( #Set(digits(n^2))==2, print1(n, ", ") ) ); /* Joerg Arndt, Mar 09 2013 */ (Python) from gmpy2 import is_square, isqrt from itertools import combinations, product A016069_list = [] for g in range(2, 10):     n = 2**g-1     for x in combinations('0123456789', 2):         for i, y in enumerate(product(x, repeat=g)):             if i > 0 and i < n and y[0] != '0':                 z = int(''.join(y))                 if is_square(z):                     A016069_list.append(int(isqrt(z))) A016069_list = sorted(A016069_list) # Chai Wah Wu, Nov 03 2014 (MAGMA) [n: n in [0..20000000] | #Set(Intseq(n^2)) eq 2]; // Vincenzo Librandi, Nov 04 2014 CROSSREFS Cf. A016070, A018884, A018885. Sequence in context: A191842 A299544 A039174 * A194283 A299546 A039128 Adjacent sequences:  A016066 A016067 A016068 * A016070 A016071 A016072 KEYWORD nonn,base,nice AUTHOR STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 5 15:20 EDT 2020. Contains 334850 sequences. (Running on oeis4.)