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.
%I A384436 #9 Jun 03 2025 17:13:05 %S A384436 1,1,1,2,4,3,3,3,3,6,5,4,5,5,4,4,6,5,4,5,7,7,5,5,7,8,6,6,8,7,7,7,7,7, %T A384436 7,6,11,9,6,7,10,7,7,7,8,8,8,6,8,11,7,7,9,10,7,7,10,10,7,7,11,10,7,7, %U A384436 13,11,7,7,11,10,7,7,10,11,8,8,11,11,9,8,11,15 %N A384436 a(n) is the number of distinct ways to represent n in any integer base >= 2 using only square digits. %C A384436 The representations of n remain the same for bases greater than n, as they all consist solely of the digit n. %H A384436 Felix Huber, <a href="/A384436/b384436.txt">Table of n, a(n) for n = 0..10000</a> %F A384436 Trivial lower bound for n >= 2: a(n) >= 2 for nonsquares n and a(n) >= 3 for squares n because in base 2 the representations of n consists only of the square digits '0' and '1', in base n the representation of n is [1,0] and in bases > n the representation of n is [n]. %e A384436 The a(36) = 11 distinct ways to represent 36 using only square digits are [1,0,0,1,0,0] in base 2, [1,1,0,0] in base 3, [1,0,0] in base 6, [4,4] in base 8, [4,0] in base 9, [1,16] in base 20, [1,9] in base 27, [1,4] in base 32, [1,1] in base 35, [1,0] in base 36 and [36] in bases >= 37. %p A384436 A384436:=proc(n) %p A384436 local a,b,c; %p A384436 a:=0; %p A384436 for b from 2 to n+1 do %p A384436 c:=convert(n,'base',b); %p A384436 if select(issqr,c)=c then %p A384436 a:=a+1 %p A384436 fi %p A384436 od; %p A384436 return max(1,a) %p A384436 end proc; %p A384436 seq(A384436(n),n=0..81); %t A384436 a[n_] := Sum[Boole[AllTrue[IntegerDigits[n, b], IntegerQ[Sqrt[#]] &]], {b, 2, n+1}]; a[0] = 1; Array[a, 100, 0] (* _Amiram Eldar_, May 29 2025 *) %o A384436 (PARI) a(n) = sum(b=2, n+1, my(d=digits(n,b)); #select(issquare, d) == #d); \\ _Michel Marcus_, May 29 2025 %Y A384436 Cf. A046030, A055240, A061845, A077268, A126071, A135551, A384211, A384212. %K A384436 nonn,base %O A384436 0,4 %A A384436 _Felix Huber_, May 29 2025