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.

A256515 Nonpalindromic positive integers k such that the absolute value of k^2 - reverse(k)^2 is a square.

This page as a plain text file.
%I A256515 #28 Sep 08 2022 08:46:11
%S A256515 56,65,5265,5625,5656,6565,12705,44370,50721,51557,55517,56056,59248,
%T A256515 65065,71555,75515,84295,139755,273728,360145,481610,523908,541063,
%U A256515 557931,560056,560439,565656,606056,621770,650065,650606,656565,697996,699796,809325,827372
%N A256515 Nonpalindromic positive integers k such that the absolute value of k^2 - reverse(k)^2 is a square.
%H A256515 Michael S. Branicky, <a href="/A256515/b256515.txt">Table of n, a(n) for n = 1..425</a> (all terms < 10^11; terms 1..68 from Bui Quang Tuan)
%e A256515 The nonpalindromic number 5265 is a term because abs(5265^2 - 5625^2) = 1980^2.
%t A256515 Select[Range[200000], ! PalindromeQ@ # && IntegerQ@ Sqrt@ Abs[#^2 - IntegerReverse[#]^2] &] (* _Michael De Vlieger_, Mar 02 2022 *)
%o A256515 (Magma) [n: n in [0..10^6] | Intseq(n) ne Reverse(Intseq(n)) and IsSquare(s) where s is Abs(n^2-Seqint(Reverse(Intseq(n)))^2)]; // _Bruno Berselli_, Apr 01 2015
%o A256515 (Python)
%o A256515 from sympy.ntheory.primetest import is_square
%o A256515 def R(n): return int(str(n)[::-1])
%o A256515 def ok(n): Rn = R(n); return n != Rn and is_square(abs(n**2 - Rn**2))
%o A256515 print([k for k in range(10**6) if ok(k)]) # _Michael S. Branicky_, Mar 02 2022
%Y A256515 Cf. A004086 (digit reversal), A202386, A068536.
%K A256515 nonn,base
%O A256515 1,1
%A A256515 _Bui Quang Tuan_, Apr 01 2015