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!)
A177952 a(n) = number of n-digit squares in base 10 such that there is at least one permutation that is also a square in base 10. Initial zeros are not allowed for any square. 0

%I #8 Oct 21 2017 16:18:47

%S 0,0,7,13,86,293,1212,4699,17380,60623,203799,664953,2135649,6800449,

%T 21572602,68311990,216144075,683666674

%N a(n) = number of n-digit squares in base 10 such that there is at least one permutation that is also a square in base 10. Initial zeros are not allowed for any square.

%C The ratio of a(n) to the n-th entry of sequence A049415 goes to 1. Bilisoly (2008), listed below, has a proof of this. Squares of this type are called "anasquares" in this reference (short for "anagram of squares").

%H R. Bilisoly, <a href="http://www.jstor.org/stable/27821789">92.45 Anasquares: Square anagrams of squares</a>, The Mathematical Gazette, 92(2008), 58-63.

%e For instance, a(3) = 7 because (1) 144, 441 are both squares and permutations of each other as is 256, 625 and 169, 196, 961 and (2) there are no other 3 digit squares that can be permuted to another square (because initial zeros are forbidden, 100 and 001, etc., do not count).

%t nAnasquares[ndigits_] := Module[{nsquares = 0, nkeys = 0, nanapat = 0, upper, lower, square, key, dictionary}, lower = Sqrt[10^(ndigits - 1)] // Ceiling; upper = Sqrt[10^ndigits - 1] // Floor; Do[ ++nsquares; square = i^2; key = ToString[FromDigits[Sort[IntegerDigits[square]]]]; If[StringQ[ dictionary[ key]] && (Length[StringPosition[dictionary[key], ","]] == 0), ++nanapat, Null] If[StringQ[dictionary[key]], dictionary[key] = dictionary[key] <> "," <> ToString[square], dictionary[key] = ToString[square]; ++nkeys], {i, lower, upper}]; Return[nsquares - nkeys + nanapat] ] Table[nAnasquares[n], {n, 1, 10}]

%Y a(n) converges to A049415 in the sense that the ratio of the two sequences goes to 1 as n goes to infinity.

%K base,more,nonn

%O 1,3

%A Roger Bilisoly (bilisolyr(AT)ccsu.edu), May 15 2010

%E a(16)-a(18) from _Donovan Johnson_, Jun 10 2010

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)