login
A343536
Positive numbers k such that the decimal expansion of k^2 appears in the concatenation of the first k positive integers.
1
1, 428, 573, 725, 727, 738, 846, 7810, 8093, 28023, 36354, 36365, 36464, 63636, 254544, 277851, 297422, 326734, 673267, 673368, 2889810, 4545454, 4545465, 5454547, 5454646, 24275425, 29411775, 47058823, 52941178, 94117748, 146407310, 263157795, 267735365, 285714186
OFFSET
1,2
COMMENTS
A030467 is a subsequence. - Chai Wah Wu, Jun 07 2021
LINKS
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