login
Internal digits of n^2 include digits of n as subsequence, n does not end in 0.
2

%I #17 Sep 04 2023 12:34:09

%S 3628,3792,8882,14651,28792,36574,37026,37028,37073,58808,68323,71213,

%T 75884,75887,75888,87073,88526,88796,88808,94682,105125,105153,146308,

%U 161574,269622,368323,369255,369482,369863,370137,370156,370162,370178

%N Internal digits of n^2 include digits of n as subsequence, n does not end in 0.

%H David A. Corneth, <a href="/A046835/b046835.txt">Table of n, a(n) for n = 1..3742</a>

%e From _David A. Corneth_, Aug 29 2023: (Start)

%e 3628 is in the sequence as 3628^2 = 13162384 and so 3628 is in the internal digits; 1(3)1(6)(2)3(8)4, reading from left to right the digits in brackets are 3628 and all these digits are internal digits of 13162384.

%e 1011 is NOT in the seuence as 1011^2 = 1022121 and so 1011 is in the digits;

%e (1)(0)22(1)2(1) but not all these digits are internal digits of 1022121. (End)

%o (Python)

%o from itertools import count, islice

%o def A046835_gen(startvalue=1): # generator of terms >= startvalue

%o for k in count(max(startvalue,1)):

%o if k%10:

%o c = iter(str(k**2)[1:-1])

%o if all(map(lambda b:any(map(lambda a:a==b,c)),str(k))):

%o yield k

%o A046835_list = list(islice(A046835_gen(),20)) # _Chai Wah Wu_, Apr 03 2023

%Y Cf. A046827, A046828, A046829, A046830, A046831, A046832, A046833, A046834, A046835, A046836, A046837, A046838.

%K nonn,base

%O 1,1

%A _David W. Wilson_