A028819 Numbers whose square has its digits in nondecreasing order.
0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 15, 16, 17, 34, 35, 37, 38, 67, 83, 106, 107, 116, 117, 167, 183, 334, 335, 337, 367, 383, 587, 667, 1633, 1667, 3334, 3335, 3337, 3367, 3383, 3667, 4833, 6667, 16667, 33334, 33335, 33337, 33367, 33667, 36667, 66667
Offset: 1
Links
- Charles R Greathouse IV and Chai Wah Wu, Table of n, a(n) for n = 1..422 (n = 1..107 from Charles R Greathouse IV).
- Patrick De Geest, Palindromic Squares in bases 2 to 17
Programs
-
Mathematica
okQ[n_]:=And@@(#[[2]]>=#[[1]]&/@Partition[IntegerDigits[n^2],2,1]) Select[Range[0,50000],okQ] (* Harvey P. Dale, Jan 09 2011 *) Select[Range[0,10^5],LessEqual@@IntegerDigits[#^2]&] (* Ray Chandler, Jan 06 2014 *)
-
PARI
mono(n)=n=eval(Vec(Str(n)));for(i=2,#n,if(n[i]
Charles R Greathouse IV, Aug 22 2011 -
Python
from itertools import combinations_with_replacement from gmpy2 import is_square, isqrt A028819_list = [0] + [int(isqrt(n)) for n in (int(''.join(i)) for l in range(1,11) for i in combinations_with_replacement('123456789',l)) if is_square(n)] # Chai Wah Wu, Dec 07 2015
Comments