This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A304290 Numbers k such that k-1 is a substring of k^2. 1

%I

%S 9,37,99,370,999,3367,9999,22186,99999,221860,333667,625001,625009,

%T 859415,926968,999999,1507152,3125001,3701562,7012141,9375009,9999999,

%U 20506249,28658098,33336667,46875009,78125001,79632152,86609391,98089448,99999999,306481073

%N Numbers k such that k-1 is a substring of k^2.

%C The repdigit sequence A002283, apart from the first term 0, is a subset.

%C 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.

%C The sequence A074992, apart from the first term 1, is a subsequence. - _Michel Marcus_, May 27 2018

%H Chai Wah Wu, <a href="/A304290/b304290.txt">Table of n, a(n) for n = 1..65</a> (n = 1..41 from Jon E. Schoenfield)

%e 9^2 = 81 and 9-1 = 8 is a substring.

%e 37^2 = 1369 and 37-1 = 36 is a substring.

%p P:=proc(q) local a,b,k,n; a:=2; b:=1;

%p for n from 1 to q do for k from 1 to ilog10(a^2)-ilog10(b)+1 do

%p if b=trunc(a^2/10^(k-1)) mod 10^(ilog10(b)+1) then print(a); fi; od;

%p b:=a; a:=a+1; od; print(); end: P(10^8);

%t Select[Range[10^6], SequenceCount[IntegerDigits[#^2], IntegerDigits[# - 1]] > 0 &] (* _Michael De Vlieger_, May 27 2018 *)

%o (Python)

%o A304290_list = [k for k in range(10**6) if str(k-1) in str(k**2)] # _Chai Wah Wu_, Oct 22 2018

%Y Cf. A002283, A074992, A282384.

%K nonn,base

%O 1,1

%A _Paolo P. Lava_, May 24 2018

%E a(32) from _Jon E. Schoenfield_, Jun 01 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 15 21:37 EST 2019. Contains 329168 sequences. (Running on oeis4.)