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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A304290 Numbers k such that k-1 is a substring of k^2. 1
9, 37, 99, 370, 999, 3367, 9999, 22186, 99999, 221860, 333667, 625001, 625009, 859415, 926968, 999999, 1507152, 3125001, 3701562, 7012141, 9375009, 9999999, 20506249, 28658098, 33336667, 46875009, 78125001, 79632152, 86609391, 98089448, 99999999, 306481073 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The repdigit sequence A002283, apart from the first term 0, is a subset.
In fact (999...9)^2 = (10^n-1)^2 = 10^n((10^n-1)-1)+1 = 10^n(999...9-1)+1 = 10^n(999...8)+1 = 999...8000...1.
The sequence A074992, apart from the first term 1, is a subsequence. - Michel Marcus, May 27 2018
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..65 (n = 1..41 from Jon E. Schoenfield)
EXAMPLE
9^2 = 81 and 9-1 = 8 is a substring.
37^2 = 1369 and 37-1 = 36 is a substring.
MAPLE
P:=proc(q) local a, b, k, n; a:=2; b:=1;
for n from 1 to q do for k from 1 to ilog10(a^2)-ilog10(b)+1 do
if b=trunc(a^2/10^(k-1)) mod 10^(ilog10(b)+1) then print(a); fi; od;
b:=a; a:=a+1; od; print(); end: P(10^8);
MATHEMATICA
Select[Range[10^6], SequenceCount[IntegerDigits[#^2], IntegerDigits[# - 1]] > 0 &] (* Michael De Vlieger, May 27 2018 *)
PROG
(Python)
A304290_list = [k for k in range(10**6) if str(k-1) in str(k**2)] # Chai Wah Wu, Oct 22 2018
CROSSREFS
Sequence in context: A341403 A320696 A299290 * A244245 A288116 A165394
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, May 24 2018
EXTENSIONS
a(32) from Jon E. Schoenfield, Jun 01 2018
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 15 18:49 EDT 2024. Contains 374333 sequences. (Running on oeis4.)