cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A376814 a(n) is the number of squares that have all digits distinct in base n.

This page as a plain text file.
%I A376814 #37 Oct 31 2024 10:41:07
%S A376814 2,2,7,7,21,42,71,268,611,1352,3099,8471,23877,63564,182771,527001,
%T A376814 1671752,5055853
%N A376814 a(n) is the number of squares that have all digits distinct in base n.
%e A376814 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.
%p A376814 f:= proc(b) local k,t,F;
%p A376814  t:= 0;
%p A376814  for k from 0 to floor(sqrt(b^b-1)) do
%p A376814    F:= convert(k^2, base, b);
%p A376814    if nops(F) = nops(convert(F,set)) then t:= t+1 fi;
%p A376814  od;
%p A376814  t
%p A376814 end proc:
%p A376814 map(f, [$2..12]);
%o A376814 (Python)
%o A376814 from math import isqrt
%o A376814 from sympy.ntheory import digits
%o A376814 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
%Y A376814 Cf. A119509, A376897.
%K A376814 nonn,base,more
%O A376814 2,1
%A A376814 _Robert Israel_, Oct 09 2024
%E A376814 a(15)-a(16) from _Michael S. Branicky_, Oct 09 2024
%E A376814 a(17) from _Michael S. Branicky_, Oct 10 2024
%E A376814 a(18) from _Michael S. Branicky_, Oct 14 2024
%E A376814 a(19) from _Michael S. Branicky_, Oct 31 2024