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.

A371812 Number of different ways A329383(n) is Brazilian.

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