login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A045879 Numbers whose square contains the same digits as some other square. 2
12, 13, 14, 16, 21, 25, 31, 32, 33, 36, 37, 42, 44, 49, 54, 64, 69, 96, 98, 99, 101, 102, 103, 106, 108, 110, 112, 113, 120, 122, 128, 129, 130, 133, 135, 137, 140, 144, 146, 148, 152, 153, 154, 155, 157, 158, 159, 160, 166, 172, 174, 178, 179, 181, 186, 190 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
12^2 = 144 has same digits as 21^2 = 441, so 12 and 21 are in the sequence.
PROG
(PARI) uptoqdigits(n) = { res = List(); for(i = 3, n, withqdigits(i); ); Set(res); }
withqdigits(n) = { my(l = List(), streak); for(i = sqrtint(10^(n-1)), sqrtint(10^n-1), listput(l, [vecsort(digits(i^2)), i])); listsort(l); print(#l); for(i = 1, #l-1, if(l[i][1] == l[i+1][1], listput(res, l[i][2]); streak = 1; , if(streak == 1, listput(res, l[i][2])); streak = 0)); if(streak == 1, listput(res, l[#l][2])); } \\ David A. Corneth, Aug 13 2021
CROSSREFS
Cf. A000290.
Sequence in context: A272270 A133894 A209725 * A257073 A239722 A112655
KEYWORD
nonn,base
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)