OFFSET
2,1
COMMENTS
Also the smallest Brazilian composite of the form (n^k - 1)/(n - 1) with k > 2.
For Mersenne numbers = (11...11)_2 = 2^k-1 in A000225, there is a smaller integer which is Brazilian prime: 7, so 7 is the first term of A285642 and another one is the smaller composite 15, so 15 is the first term of this sequence.
For numbers (11...11)_3 = (3^k-1)/2 in A003462, there is also a smaller integer which is Brazilian prime:13, so 13 is the second term of A285642 and another one is the smaller Brazilian composite: 40, so 40 is the second term of this sequence.
For numbers like (11...11)_4 = (4^k-1)/3, the terms are respectively 0 in A285642 because there is no Brazilian prime of this type and 21 for composite numbers of this sequence, and so on.
LINKS
Wikipedia, Nombre brésilien
EXAMPLE
15 = (1111)_2, 40 = (1111)_3, 21 = (111)_4, 156 = (1111)_5.
PROG
(PARI) a(n) = {my(k=4, x); while (isprime(x=(n^(k-1)-1)/(n-1)), k++); x; } \\ Michel Marcus, May 17 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, May 12 2019
EXTENSIONS
More terms from Michel Marcus, May 17 2019
STATUS
approved