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.

Showing 1-1 of 1 results.

A256437 Nonnegative integers i such that i^2 + reverse(i)^2 is a palindrome.

Original entry on oeis.org

0, 1, 2, 10, 11, 12, 20, 21, 30, 100, 101, 102, 110, 111, 120, 200, 201, 210, 220, 300, 310, 1000, 1001, 1002, 1010, 1011, 1012, 1020, 1021, 1022, 1100, 1101, 1102, 1110, 1111, 1120, 1200, 1201, 1210, 1300, 2000, 2001, 2010, 2011, 2100, 2101, 2110, 2200, 2201
Offset: 1

Views

Author

Bui Quang Tuan, Mar 29 2015

Keywords

Comments

This sequence generates A256398.

Examples

			12 is in the sequence because 12^2 + 21^2 = 585, a palindrome.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_] := Reverse@ IntegerDigits@ n == IntegerDigits@ n; Select[
    Range@2210, palQ[#^2 + FromDigits[Reverse[IntegerDigits@ #]]^2] &] (* Michael De Vlieger, Mar 29 2015 *)
  • PARI
    rev(n)=r=""; d=digits(n); for(i=1, #d, r=concat(Str(d[i]), r)); eval(r);
    ispal(n) = d = digits(n); Vecrev(d) == d;
    isok(n) = ispal(n^2+rev(n)^2) \\ Michel Marcus, Apr 01 2015
    
  • Python
    A256437_list = [i for i in range(10**6) if str(i**2 + int(str(i)[::-1])**2) == str(i**2 + int(str(i)[::-1])**2)[::-1]] # Chai Wah Wu, Apr 09 2015
Showing 1-1 of 1 results.