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.

A085305 Numbers such that first reversing digits and then squaring equals the result of first squaring and then reversing.

This page as a plain text file.
%I A085305 #39 Sep 08 2022 08:45:11
%S A085305 0,1,2,3,11,12,13,21,22,31,101,102,103,111,112,113,121,122,201,202,
%T A085305 211,212,221,301,311,1001,1002,1003,1011,1012,1013,1021,1022,1031,
%U A085305 1101,1102,1103,1111,1112,1113,1121,1122,1201,1202,1211,1212,1301,2001,2002,2011
%N A085305 Numbers such that first reversing digits and then squaring equals the result of first squaring and then reversing.
%C A085305 Only digits {0, 1, 2, 3} seem to arise.
%C A085305 Numbers (other than 0) that end in zero are excluded. - _N. J. A. Sloane_, Mar 20 2010
%D A085305 David Wells, The Dictionary of Curious and Interesting Numbers. London: Penguin Books (1997): p. 124.
%H A085305 Reinhard Zumkeller, <a href="/A085305/b085305.txt">Table of n, a(n) for n = 1..1000</a>
%H A085305 <a href="/index/Sq#sqrev">Index entry for sequences related to reversing digits of squares</a>
%F A085305 Solutions to rev(x^2) = rev(x)^2.
%e A085305 n = 13 is a term because 31^2 = 961 = rev(169) = rev(13^2) = rev(rev(31)^2).
%t A085305 rt[x_] := tn[Reverse[IntegerDigits[x]]] Do[s = rt[n^2]; s1=rt[n]^2; If[Equal[s, s1]&&!Equal[Mod[n, 10], 0], Print[{n, s, rt[s1]}]], {n, 0, 1000000}]
%t A085305 (* Second program: *)
%t A085305 Select[Range[0, 1999], Mod[#,10] != 0 && FromDigits[Reverse[IntegerDigits[#^2]]] == FromDigits[Reverse[IntegerDigits[#]]]^2 &] (* _Alonso del Arte_, Oct 08 2012; corrected by _Jean-François Alcover_, Jan 11 2021 *)
%o A085305 a085305 n = a085305_list !! (n-1)
%o A085305 a085305_list = 0 : filter (\x -> x `mod` 10 > 0
%o A085305                                  && a004086 (x^2) == (a004086 x)^2) [1..]
%o A085305 -- _Reinhard Zumkeller_, Jul 08 2011
%o A085305 (Magma) [0] cat [ m: n in [1..1810] | Reverse(Intseq(m^2)) eq Intseq(Seqint(Reverse(Intseq(m)))^2) where m is n+Floor((n-1)/9) ];  // _Bruno Berselli_, Jul 08 2011
%o A085305 (PARI) isok(x) = (x==0) || ((x%10) && fromdigits(Vecrev(digits(x^2))) == fromdigits(Vecrev(digits(x)))^2); \\ _Michel Marcus_, Jan 11 2021
%Y A085305 Cf. A085306. See A061909 for another version.
%K A085305 base,nonn
%O A085305 1,3
%A A085305 _Labos Elemer_, Jun 27 2003