OFFSET
1,1
COMMENTS
Does the sequence contain all numbers > 327?
Conjecture is true up to 10^6. - Michael S. Branicky, Apr 03 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
a(3) = 26 is a term because the digits of 26^2 = 676 form a subsequence of those of 2^26 = 67108864.
MAPLE
filter:= proc(n) local L, nL, M, nM, i, j, k;
L:= convert(n^2, base, 10); nL:= nops(L);
M:= convert(2^n, base, 10); nM:= nops(M);
j:= 1:
for i from 1 to nL do
if not member(L[i], M[j..nM], 'k') then return false fi;
j:= j+k;
od;
true
end proc:
select(filter, [$0..200]);
PROG
(Python)
from itertools import count, islice, product
def ok(n):
s, p = n**2, 2**n
while s and p:
if p%10 == s%10:
s //= 10
p //= 10
return s == 0 and n > 0
print([k for k in range(200) if ok(k)]) # Michael S. Branicky, Apr 03 2023
(Python)
from itertools import count, islice
def A362001_gen(startvalue=1): # generator of terms >= startvalue
for k in count(max(startvalue, 1)):
c = iter(str(1<<k))
if all(map(lambda b:any(map(lambda a:a==b, c)), str(k**2))):
yield k
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Apr 02 2023
STATUS
approved