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.

A033294 Squares which when written backwards remain square (final 0's excluded).

Original entry on oeis.org

1, 4, 9, 121, 144, 169, 441, 484, 676, 961, 1089, 9801, 10201, 10404, 10609, 12321, 12544, 12769, 14641, 14884, 40401, 40804, 44521, 44944, 48841, 69696, 90601, 94249, 96721, 698896, 1002001, 1004004, 1006009, 1022121, 1024144, 1026169
Offset: 1

Views

Author

Keywords

Comments

Of this sequence's first 10000 terms, only nine have an even number of digits; see A354256.

Examples

			144 = 12 * 12 is a term because 441 = 21 * 21.
		

Crossrefs

Subsequence of A115690.

Programs

  • Haskell
    a033294 n = a033294_list !! (n-1)
    a033294_list = filter chi a000290_list where
      chi m = m `mod` 10 > 0 && head ds `elem` [1,4,5,6,9] &&
              a010052 (foldl (\v d -> 10 * v + d) 0 ds) == 1 where
        ds = unfoldr
             (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 10) m
    -- Reinhard Zumkeller, Jan 19 2012
    
  • Mathematica
    Select[Range[1100]^2,Mod[#,10]!=0&&IntegerQ[Sqrt[FromDigits[Reverse[ IntegerDigits[ #]]]]]&] (* Harvey P. Dale, Oct 28 2013 *)
  • Python
    from math import isqrt
    from itertools import count, islice
    def sqr(n): return isqrt(n)**2 == n
    def agen():
        yield from (k*k for k in count(1) if k%10 and sqr(int(str(k*k)[::-1])))
    print(list(islice(agen(), 36))) # Michael S. Branicky, May 21 2022

Extensions

More terms from Erich Friedman
Initial 0 removed and offset changed by Reinhard Zumkeller, Jan 19 2012