%I #21 May 27 2024 15:27:47
%S 0,1,2,3,4,5,7,8,9,11,14,15,16,17,19,23,29,31,35,39,41,44,47,49,52,59,
%T 63,71,79,83,89,95,99,107,111,119,127,143,159,167,179,190,191,199,215,
%U 223,239,251,255,287,299,319,335,359,383,399,431,447,479,503
%N Number of different ways A329383(n) is Brazilian.
%C Or number of bases from 2 to n-2 in which the highly Brazilian number A329383(n) is a repdigit number.
%C Note that from a(26) to a(75) except for a(31) and a(42), a(n) = 4k-1 for some k.
%H Daniel Mondot, <a href="/A371812/b371812.txt">Table of n, a(n) for n = 1..91</a>
%e A329383(2) = 7 is Brazilian in only 1 base below 6 (base 2), so a(2) = 1.
%e A329383(3) = 15 is Brazilian in 2 bases below 14 (bases 2, 4), so a(3) = 2.
%o (C)
%o #include <stdio.h>
%o FILE *fi;
%o unsigned int cnt, d, line;
%o long unsigned base, k, ln;
%o void main()
%o {
%o fi = fopen("b329383.txt", "r");
%o for(;;)
%o {
%o if (fscanf(fi, "%u %lu", &line, &ln) < 2) break;
%o for (cnt=0, base=2; base<ln-1; ++base)
%o {
%o if (d = ln % base)
%o for (k = ln / base; k;)
%o {
%o if ((k % base) != d) break;
%o if ((k /= base) == 0) ++cnt;
%o }
%o }
%o printf("%u %u\n", line, cnt);
%o }
%o fclose(fi);
%o }
%Y Cf. A329383, A284758, A242397.
%K nonn,base
%O 1,3
%A _Daniel Mondot_, Apr 06 2024