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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A323612 Numbers k such that k^2 starts with at least the same number >= 2 of equal digits as does k itself. 1
 88, 332, 334, 335, 336, 337, 338, 339, 664, 665, 667, 668, 669, 880, 881, 882, 883, 995, 996, 997, 998, 3317, 3318, 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 3332, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Reiner Moewald, Table of n, a(n) for n = 1..24527 EXAMPLE 332^2 = 110224, i.e., both the integer and its square start with two equal digits. Also 334^2 = 111556, so 334 is a term. PROG (Python) def zahl(z): a = str(z) r = 0 while r < len(a) and a[0] == a[r]: r = r + 1 b = str(z*z) s = 0 while r < len(b) and b[0] == b[s]: s = s + 1 if r >= 2: return(s-r) else: return(-1) anz = 0 for i in range(1000000): if zahl(i) >= 0: anz = anz +1 print(anz, i) (PARI) nbi(d) = my(nb=1); for(k=2, #d, if (d[k] == d[1], nb++, break)); nb; isok(n) = my(nb = nbi(digits(n))); (nb > 1) && (nbi(digits(n^2)) >= nb); \\ Michel Marcus, Apr 24 2019 CROSSREFS Sequence in context: A001347 A003782 A235026 * A235019 A241846 A064022 Adjacent sequences: A323609 A323610 A323611 * A323613 A323614 A323615 KEYWORD nonn,base AUTHOR Reiner Moewald, Jan 20 2019 STATUS approved

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.

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