cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

206, 224, 314, 1799, 2006, 11087, 13364, 15839, 17153, 17324, 20006, 22184, 22706, 24524, 24542, 40031, 40247, 45314, 47069, 48824, 55556, 61694, 64691, 70559, 71351, 89774, 90224, 102374, 108251, 112292, 129824, 132506, 137987, 151757, 154295, 157706, 162089, 167273, 170324, 171557, 175031
Offset: 1

Views

Author

Dhilan Lahoti, Aug 30 2015

Keywords

Comments

Numbers of the form 2*10^k + 6 where k > 1 always appear in this sequence.
Numbers of the form 4*10^k + 31 and 86*10^k + 39 always appear when k > 3.
Similar to A072841 but with (n+2)^2 instead of (n+1)^2.
All numbers in the sequence are of the form 3n + 2.
Multiples of 5 seem to be uncommon.
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

Examples

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

Crossrefs

Cf. A072841.

Programs

  • Maple
    filter:= proc(n) local L1, L2;
      L1:= convert(n^2,base,10);
      L2:= convert((n+2)^2,base,10);
      evalb(sort(L1)=sort(L2));
    end proc:
    select(filter, [3*i+2 $ i = 1..10^5]); # Robert Israel, Aug 31 2015
  • Mathematica
    Select[Range[10^4], Sort[IntegerDigits[#^2]] == Sort[IntegerDigits[(# + 2)^2]] &] (* Typo fixed by Ivan N. Ianakiev, Sep 02 2015 *)
  • PARI
    isok(n) = vecsort(digits(n^2)) == vecsort(digits((n+2)^2)); \\ Michel Marcus, Aug 31 2015
    
  • Python
    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