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!)
A281822 Least number k such that (k+n)^2 contains k as a substring. 2
1, 8, 6, 1, 4, 9, 62, 6, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 1, 5, 1, 2, 9, 2, 4, 2, 92, 9, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 3, 1, 3, 3, 1, 2, 1, 4, 4, 2, 4, 4, 2, 4, 1, 5, 1, 1, 5, 2, 4, 2, 4, 2, 1, 5, 1, 6, 5, 2, 4, 8, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
a(1) = 8 because (8 + 1)^2 = 9^2 = 81 contains 8 as a substring and it is the least number with this property.
MAPLE
with(numtheory): P:= proc(q) local a, b, d, j, k, n, ok;
for n from 0 to q do for k from 1 to q do a:=ilog10(k)+1; b:=(n+k)^2; d:=ilog10((k+n)^2)-ilog10(k)+1;
ok:=0; for j from 1 to d do if k=(b mod 10^a) then ok:=1; break; else b:=trunc(b/10); fi; od;
if ok=1 then print(k); break; fi; od; od; end: P(10^6);
CROSSREFS
Sequence in context: A011009 A155184 A153101 * A130787 A273774 A153493
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Jan 31 2017
EXTENSIONS
Typo in definition corrected by Harvey P. Dale, Feb 27 2017.
Entries, Maple code and b-file corrected at the suggestion of Harvey P. Dale, Feb 28 2017.
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 March 28 14:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)