%I #21 Feb 19 2026 22:54:28
%S 2,3,2,2,2,7,2,2,2,2,2,2,14,3,2,2,2,2,2,2,4,2,2,2,26,2,4,3,2,3,2,2,2,
%T 2,2,2,3,2,2,2,3,2,6,3,2,2,2,2,50,2,4,53,2,2,7,3,2,7,2,2,62,3,2,2,2,2,
%U 2,2,4,2,2,2,8,2,4,7,2,2,2,2,4,2,3,3,2,2,4,3,2,3,2,2,3,2,2,2,98,2
%N a(n) is the least value of m such that n has a prime number of ones in its base m expansion.
%C a(n) <= n-1 since n in base n-1 is 11, which has two ones, and 2 is prime.
%H Sean A. Irvine, <a href="/A393198/b393198.txt">Table of n, a(n) for n = 3..1000</a>
%e The expression of n=16 in base 2 is 10000, which has one 1; its expression in base 3 is 121, which has two ones, and 2 is prime. So a(16)=3.
%t Table[First@Select[Range[2, n], PrimeQ[Count[IntegerDigits[n, #], 1]] &], {n, 3, 100}]
%o (PARI) a(n) = my(m=2); while (!isprime(#select(x->(x==1), digits(n,m))), m++); m; \\ _Michel Marcus_, Feb 07 2026
%o (Python)
%o from itertools import count
%o from sympy.ntheory.factor_ import isprime, digits
%o def A393198(n): return next(m for m in count(2) if isprime(digits(n,m).count('1'))) # _Chai Wah Wu_, Feb 19 2026
%Y Cf. A052294, A084345.
%K nonn,base
%O 3,1
%A _Diego Artacho_ and _Andreas Vermeiren_, Feb 05 2026