OFFSET
2,1
EXAMPLE
a(4) = 7 because the only squares with distinct digits in base 4 are 0^2 = 0_4, 1^2 = 1_4, 2^2 = 10_4, 3^2 = 21_4, 6^2 = 210_4, 7^2 = 301_4 and 15^2 = 3201_4.
MAPLE
f:= proc(b) local k, t, F;
t:= 0;
for k from 0 to floor(sqrt(b^b-1)) do
F:= convert(k^2, base, b);
if nops(F) = nops(convert(F, set)) then t:= t+1 fi;
od;
t
end proc:
map(f, [$2..12]);
PROG
(Python)
from math import isqrt
from sympy.ntheory import digits
def A376814(n): return sum(1 for k in range(isqrt(n**n-1)+1) if len(s:=digits(k**2, n)[1:])==len(set(s))) # Chai Wah Wu, Oct 09 2024
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Robert Israel, Oct 09 2024
EXTENSIONS
a(15)-a(16) from Michael S. Branicky, Oct 09 2024
a(17) from Michael S. Branicky, Oct 10 2024
a(18) from Michael S. Branicky, Oct 14 2024
a(19) from Michael S. Branicky, Oct 31 2024
STATUS
approved