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.

A290015 Brazilian numbers which have exactly two Brazilian representations.

This page as a plain text file.
%I A290015 #27 Jul 24 2020 07:12:45
%S A290015 15,18,21,26,28,30,31,32,44,45,50,52,56,57,62,64,68,75,76,85,86,91,92,
%T A290015 93,98,99,110,111,116,117,129,133,146,147,148,153,164,175,183,188,207,
%U A290015 212,215,219,236,243,244,245,259,261,268,275,279,284,314,316,325,332,338,341,343,356,363,365,369,381,387,388
%N A290015 Brazilian numbers which have exactly two Brazilian representations.
%C A290015 These numbers could be called 2-Brazilian numbers.
%C A290015 The smallest number of this sequence is 15 which is also the smallest odd composite Brazilian in A257521 with 15 = 11111_2 = 33_4. The number 15 is highly Brazilian in A329383.
%C A290015 Following the Goormaghtigh conjecture, only two primes, 31 and 8191, which are both Mersenne numbers, are Brazilian in two different bases (A119598).
%H A290015 Wikipedia, <a href="http://en.wikipedia.org/wiki/Goormaghtigh_conjecture">Goormaghtigh conjecture</a>
%e A290015 18 = 2 * 9 = 22_8 = 3 * 6 = 33_5.
%e A290015 26 = 2 * 13 = 2 * 111_3 = 222_3 = 22_12.
%e A290015 31 = 11111_2 = 111_5;
%e A290015 8191 = 1111111111111_2 = 111_90.
%p A290015 bresilienbaseb:=proc(n,b)
%p A290015 local r,q,coupleq:
%p A290015 if n<b then
%p A290015 return [1,n]
%p A290015 else
%p A290015 r:=(n mod b):
%p A290015 q:=(n-r)/b
%p A290015 coupleq:=bresilienbase(q,b):
%p A290015 if r=coupleq[2] and r>0 then
%p A290015 return [couple[1]+1,r]
%p A290015 else
%p A290015 return [0,0]
%p A290015 end if
%p A290015 end if
%p A290015 end proc;
%p A290015 bresil:=proc(n)
%p A290015 local b,L,k,t:
%p A290015 k:=0:
%p A290015 for b from 2 to (n-2) do
%p A290015 t:=bresilienbase(n,b):
%p A290015 if t[1]>0 then
%p A290015 k:=k+1
%p A290015 L[k]:=[b,t[1],t[2]]:
%p A290015 end if:
%p A290015 end do:
%p A290015 seq(L[i],i=1..k);
%p A290015 end proc;
%p A290015 nbbresil:=n->nops([bresil(n)]);
%p A290015 #Numbers 2 times Brazilian
%p A290015 for n from 1 to 100 do if nbbresil(n)=2 then print(n,bresil(n)) else fi; od:
%t A290015 Flatten@ Position[#, 2] &@ Table[Count[Range[2, n - 2], _?(And[Length@ # != 1, Length@ Union@ # == 1] &@ IntegerDigits[n, #] &)], {n, 400}] (* _Michael De Vlieger_, Jul 18 2017 *)
%Y A290015 Cf. A085104, A125134, A220570, A220571, A257521, A284758, A288783, A290016, A290017, A290018, A329383.
%K A290015 nonn,base
%O A290015 1,1
%A A290015 _Bernard Schott_, Jul 17 2017