OFFSET
1,2
COMMENTS
A030467 is a subsequence. - Chai Wah Wu, Jun 07 2021
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..116
EXAMPLE
428^2 = 183184, which appears in the concatenation of the first 428 positive integers at 183,184, i.e., (183184), so 428 is a term.
725^2 = 525625, which appears in the concatenation of the first 725 positive integers at 255,256,257, i.e., 25(525625)7, so 725 is a term.
MATHEMATICA
Select[Range@1000, StringContainsQ[""<>ToString/@Range@#, ToString[#^2]]&] (* Giorgos Kalogeropoulos, Apr 24 2021 *)
PROG
(Java)
public class Oeis2 {
public static void main(String[] args) {
StringBuilder str = new StringBuilder();
long n = 1;
while (true) {
str.append(n);
if (str.indexOf(String.valueOf(n * n)) >= 0) {
System.out.print(n + ", ");
}
n++;
}
}
}
(PARI) f(n) = my(s=""); for(k=1, n, s=Str(s, k)); s; \\ from A007908
isok(k) = #strsplit(f(k), Str(k^2)) > 1; \\ Michel Marcus, May 02 2021
(Python)
A343536_list, k, s = [], 1, '1'
while k < 10**6:
if str(k**2) in s:
A343536_list.append(k)
k += 1
s += str(k) # Chai Wah Wu, Jun 06 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
John R Phelan, Apr 18 2021
EXTENSIONS
More terms from Jinyuan Wang, Apr 30 2021
STATUS
approved