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.

Previous Showing 11-13 of 13 results.

A030075 Squares which are palindromes in base 15.

Original entry on oeis.org

0, 1, 4, 9, 16, 64, 144, 256, 361, 1024, 1521, 4096, 5776, 16384, 20736, 51076, 58081, 65536, 73441, 96721, 204304, 218089, 228484, 232324, 331776, 511225, 817216, 929296, 1048576, 3055504, 3268864, 3489424, 5308416, 7033104
Offset: 1

Views

Author

Keywords

Examples

			8^2 = 64, which in base 15 is 44, and that's palindromic, so 64 is in the sequence.
9^2 = 81, which in base 15 is 56. Since that's not palindromic, 81 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 10^10: # to get all entries <= N
    count:= 0:
    for x from 0 to floor(sqrt(N)) do
        y:= x^2;
        L:= convert(y,base,15);
      if ListTools[Reverse](L) = L then
         count:= count+1;
         A[count]:= y;
       fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Jul 24 2014
  • Mathematica
    palQ[n_, b_:10] := Module[{idn = IntegerDigits[n, b]}, idn == Reverse[idn]]; Select[Range[0, 2700]^2, palQ[#, 15] &]  (* Harvey P. Dale, Apr 23 2011 *)
  • PARI
    isok(n) = my(d=digits(n,15)); issquare(n) && (d == Vecrev(d)); \\ Michel Marcus, Oct 21 2016

A263610 Palindromes in base 4 which are also squares.

Original entry on oeis.org

0, 1, 121, 10201, 12321, 1002001, 1032301, 1223221, 100020001, 102030201, 103101301, 120202021, 10000200001, 10033233001, 1000002000001, 1002003002001, 1003010103001, 1021320231201, 1211130311121, 1212110112121, 1213332333121, 100000020000001, 100033323330001, 100331000133001
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2015

Keywords

Crossrefs

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

Original entry on oeis.org

0, 1, 11, 101, 111, 1001, 1013, 1103, 10001, 10101, 10121, 10331, 100001, 100133, 1000001, 1001001, 1001201, 1010301, 1100211, 1100323, 1101211, 10000001, 10001333, 10013201, 10031113, 100000001, 100010001, 100012001, 100103001, 100301113, 100332101, 101002101, 103231203, 110002011
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2015

Keywords

Examples

			From _Mattew Bondar_, Mar 12 2021: (Start)
111_4 = 21_10, 21^2 = 441, 441_10 = 12321_4 (palindrome).
1013_4 = 71_10, 71^2 = 5041, 5041_10 = 1032301_4 (palindrome). (End)
		

Crossrefs

Programs

  • Mathematica
    FromDigits /@ IntegerDigits[Select[Range[0, 2^17], PalindromeQ@ IntegerDigits[#^2, 4] &], 4] (* Michael De Vlieger, Mar 13 2021 *)
  • Python
    def decimal_to_quaternary(n):
        if n == 0:
            return '0'
        b = ''
        while n > 0:
            b = str(n % 4) + b
            n = n // 4
        return b
    x = 0
    counter = 0
    while True:
        y = decimal_to_quaternary(x ** 2)
        if y == y[::-1]:
            print(int(decimal_to_quaternary(x)))
            counter += 1
        x += 1  # Mattew Bondar, Mar 10 2021
Previous Showing 11-13 of 13 results.