login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046851 Numbers n such that n^2 can be obtained from n by inserting internal (but not necessarily contiguous) digits. 6
0, 1, 10, 11, 95, 96, 100, 101, 105, 110, 125, 950, 960, 976, 995, 996, 1000, 1001, 1005, 1006, 1010, 1011, 1021, 1025, 1026, 1036, 1046, 1050, 1100, 1101, 1105, 1201, 1205, 1250, 1276, 1305, 1316, 1376, 1405, 9500, 9505, 9511, 9525, 9600, 9605, 9625 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

EXAMPLE

110^2 = 12100 (insert "2" and "0" into "1_1_0").

PROG

(Haskell)

import Data.List (isInfixOf)

a046851 n = a046851_list !! (n-1)

a046851_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 [] ys       = True

   isSub _  []       = False

   isSub us'@(u:us) (v:vs)

         | u == v    = isSub us vs

         | otherwise = isSub us' vs

-- Reinhard Zumkeller, Jul 27 2011

CROSSREFS

Cf. A045953, A008851, A018834, A086457 (subsequence).

Sequence in context: A037958 A041214 A086457 * A045953 A136830 A153069

Adjacent sequences:  A046848 A046849 A046850 * A046852 A046853 A046854

KEYWORD

nonn,base,easy,nice

AUTHOR

David W. Wilson (davidwwilson(AT)comcast.net)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 00:09 EST 2012. Contains 205978 sequences.