login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A256515
Nonpalindromic positive integers k such that the absolute value of k^2 - reverse(k)^2 is a square.
4
56, 65, 5265, 5625, 5656, 6565, 12705, 44370, 50721, 51557, 55517, 56056, 59248, 65065, 71555, 75515, 84295, 139755, 273728, 360145, 481610, 523908, 541063, 557931, 560056, 560439, 565656, 606056, 621770, 650065, 650606, 656565, 697996, 699796, 809325, 827372
OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..425 (all terms < 10^11; terms 1..68 from Bui Quang Tuan)
EXAMPLE
The nonpalindromic number 5265 is a term because abs(5265^2 - 5625^2) = 1980^2.
MATHEMATICA
Select[Range[200000], ! PalindromeQ@ # && IntegerQ@ Sqrt@ Abs[#^2 - IntegerReverse[#]^2] &] (* Michael De Vlieger, Mar 02 2022 *)
PROG
(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
(Python)
from sympy.ntheory.primetest import is_square
def R(n): return int(str(n)[::-1])
def ok(n): Rn = R(n); return n != Rn and is_square(abs(n**2 - Rn**2))
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Mar 02 2022
CROSSREFS
Cf. A004086 (digit reversal), A202386, A068536.
Sequence in context: A039428 A043251 A044031 * A238227 A216855 A219800
KEYWORD
nonn,base
AUTHOR
Bui Quang Tuan, Apr 01 2015
STATUS
approved