login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A263609 Base-4 numbers whose square is a palindrome in base 4. 0

%I #21 Apr 05 2021 04:09:01

%S 0,1,11,101,111,1001,1013,1103,10001,10101,10121,10331,100001,100133,

%T 1000001,1001001,1001201,1010301,1100211,1100323,1101211,10000001,

%U 10001333,10013201,10031113,100000001,100010001,100012001,100103001,100301113,100332101,101002101,103231203,110002011

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

%H 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 From _Mattew Bondar_, Mar 12 2021: (Start)

%e 111_4 = 21_10, 21^2 = 441, 441_10 = 12321_4 (palindrome).

%e 1013_4 = 71_10, 71^2 = 5041, 5041_10 = 1032301_4 (palindrome). (End)

%t FromDigits /@ IntegerDigits[Select[Range[0, 2^17], PalindromeQ@ IntegerDigits[#^2, 4] &], 4] (* _Michael De Vlieger_, Mar 13 2021 *)

%o (Python)

%o def decimal_to_quaternary(n):

%o if n == 0:

%o return '0'

%o b = ''

%o while n > 0:

%o b = str(n % 4) + b

%o n = n // 4

%o return b

%o x = 0

%o counter = 0

%o while True:

%o y = decimal_to_quaternary(x ** 2)

%o if y == y[::-1]:

%o print(int(decimal_to_quaternary(x)))

%o counter += 1

%o x += 1 # _Mattew Bondar_, Mar 10 2021

%Y Cf. A002778, A029986, A263610, A029987.

%K nonn,base

%O 1,3

%A _N. J. A. Sloane_, Oct 22 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)