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.

A045953 Numbers m such that m^2 can be obtained from m by inserting an internal block of (contiguous) digits.

Original entry on oeis.org

0, 1, 10, 11, 95, 96, 100, 101, 125, 976, 995, 996, 1000, 1001, 1025, 1376, 9625, 9976, 9995, 9996, 10000, 10001, 10025, 10376, 10625, 99376, 99625, 99976, 99995, 99996, 100000, 100001, 100025, 100376, 100625, 109376, 990625, 999376, 999625, 999976
Offset: 1

Views

Author

John "MazeMan" Knoderer (Webmaster(AT)Mazes.com)

Keywords

Comments

All terms of this sequence appear in A086457. - Jeremy Gardiner, Jul 20 2003
It seems that for any nonnegative integer k the number of k-digit terms is 2k. - Ivan N. Ianakiev, Aug 17 2021

Examples

			95^2 = 9025 (insert '02' inside '95').
		

Crossrefs

Programs

  • Haskell
    import Data.List (isPrefixOf, inits, isSuffixOf, tails)
    a045953 n = a045953_list !! (n-1)
    a045953_list = filter chi a008851_list where
       chi n = (x == y && xs `isSub'` ys) where
          x:xs = show $ div n 10
          y:ys = show $ div (n^2) 10
          isSub' us vs = any id $ zipWith (&&)
                                  (map (`isPrefixOf` vs) $ inits us)
                                  (map (`isSuffixOf` vs) $ tails us)
    -- Reinhard Zumkeller, Jul 27 2011