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.

A263609 Base-4 numbers whose square is a palindrome in base 4.

This page as a plain text file.
%I A263609 #21 Apr 05 2021 04:09:01
%S A263609 0,1,11,101,111,1001,1013,1103,10001,10101,10121,10331,100001,100133,
%T A263609 1000001,1001001,1001201,1010301,1100211,1100323,1101211,10000001,
%U A263609 10001333,10013201,10031113,100000001,100010001,100012001,100103001,100301113,100332101,101002101,103231203,110002011
%N A263609 Base-4 numbers whose square is a palindrome in base 4.
%H A263609 G. J. Simmons, <a href="/A002778/a002778.pdf">On palindromic squares of non-palindromic numbers</a>, J. Rec. Math., 5 (No. 1, 1972), 11-19. [Annotated scanned copy]
%e A263609 From _Mattew Bondar_, Mar 12 2021: (Start)
%e A263609 111_4 = 21_10, 21^2 = 441, 441_10 = 12321_4 (palindrome).
%e A263609 1013_4 = 71_10, 71^2 = 5041, 5041_10 = 1032301_4 (palindrome). (End)
%t A263609 FromDigits /@ IntegerDigits[Select[Range[0, 2^17], PalindromeQ@ IntegerDigits[#^2, 4] &], 4] (* _Michael De Vlieger_, Mar 13 2021 *)
%o A263609 (Python)
%o A263609 def decimal_to_quaternary(n):
%o A263609     if n == 0:
%o A263609         return '0'
%o A263609     b = ''
%o A263609     while n > 0:
%o A263609         b = str(n % 4) + b
%o A263609         n = n // 4
%o A263609     return b
%o A263609 x = 0
%o A263609 counter = 0
%o A263609 while True:
%o A263609     y = decimal_to_quaternary(x ** 2)
%o A263609     if y == y[::-1]:
%o A263609         print(int(decimal_to_quaternary(x)))
%o A263609         counter += 1
%o A263609     x += 1  # _Mattew Bondar_, Mar 10 2021
%Y A263609 Cf. A002778, A029986, A263610, A029987.
%K A263609 nonn,base
%O A263609 1,3
%A A263609 _N. J. A. Sloane_, Oct 22 2015