login
Numbers k where k^2 is an anagram of (k+2)^2.
1

%I #30 Feb 19 2021 05:27:13

%S 206,224,314,1799,2006,11087,13364,15839,17153,17324,20006,22184,

%T 22706,24524,24542,40031,40247,45314,47069,48824,55556,61694,64691,

%U 70559,71351,89774,90224,102374,108251,112292,129824,132506,137987,151757,154295,157706,162089,167273,170324,171557,175031

%N Numbers k where k^2 is an anagram of (k+2)^2.

%C Numbers of the form 2*10^k + 6 where k > 1 always appear in this sequence.

%C Numbers of the form 4*10^k + 31 and 86*10^k + 39 always appear when k > 3.

%C Similar to A072841 but with (n+2)^2 instead of (n+1)^2.

%C All numbers in the sequence are of the form 3n + 2.

%C Multiples of 5 seem to be uncommon.

%C Another subsequence is numbers of the form 5*(10^(5+9*k)-1)/9 + 1, i.e. 4+9*k 5's followed by a 6: 55556, 55555555555556, 55555555555555555555556, etc. - _Robert Israel_, Aug 31 2015

%H Amiram Eldar, <a href="/A261749/b261749.txt">Table of n, a(n) for n = 1..10000</a>

%e 206 is a term in the sequence because 206^2 (42436) and 208^2 (43264) are anagrams.

%p filter:= proc(n) local L1, L2;

%p L1:= convert(n^2,base,10);

%p L2:= convert((n+2)^2,base,10);

%p evalb(sort(L1)=sort(L2));

%p end proc:

%p select(filter, [3*i+2 $ i = 1..10^5]); # _Robert Israel_, Aug 31 2015

%t Select[Range[10^4], Sort[IntegerDigits[#^2]] == Sort[IntegerDigits[(# + 2)^2]] &] (* Typo fixed by _Ivan N. Ianakiev_, Sep 02 2015 *)

%o (PARI) isok(n) = vecsort(digits(n^2)) == vecsort(digits((n+2)^2)); \\ _Michel Marcus_, Aug 31 2015

%o (Python)

%o A261749_list = [n for n in range(1,10**6) if sorted(str(n**2)) == sorted(str((n+2)**2))] # _Chai Wah Wu_, Sep 02 2015

%Y Cf. A072841.

%K nonn,base,easy

%O 1,1

%A _Dhilan Lahoti_, Aug 30 2015