OFFSET
1,3
COMMENTS
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").
LINKS
R. Bilisoly, 92.45 Anasquares: Square anagrams of squares, The Mathematical Gazette, 92(2008), 58-63.
EXAMPLE
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).
MATHEMATICA
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}]
CROSSREFS
KEYWORD
base,more,nonn
AUTHOR
Roger Bilisoly (bilisolyr(AT)ccsu.edu), May 15 2010
EXTENSIONS
a(16)-a(18) from Donovan Johnson, Jun 10 2010
STATUS
approved