login
Primes that are neither of the form (c^q+1)/(c+1) and nor of the form (b^k-1)/(b-1) for any b, c > 1 and k, q primes > 2.
1

%I #17 May 01 2021 13:41:48

%S 2,5,17,19,23,29,37,41,47,53,59,67,71,79,83,89,97,101,103,107,109,113,

%T 131,137,139,149,151,163,167,173,179,181,191,193,197,199,223,227,229,

%U 233,239,251,257,263,269,271,277,281,283,293,311,313,317,331,337,347,349,353,359,367

%N Primes that are neither of the form (c^q+1)/(c+1) and nor of the form (b^k-1)/(b-1) for any b, c > 1 and k, q primes > 2.

%C Equivalently, non-Brazilian primes that are not of the form (c^q+1)/(c+1) for some c > 1, q prime > 2.

%C Equals A220627 \ A059055.

%o (PARI) isc(p) = for (b=2, p, my(k=3); while ((x=(b^k+1)/(b+1)) <= p, if (x == p, return (1)); k = nextprime(k+1); ); );

%o isnotb(p) = for (b=2, p-1, my(d=digits(p, b), md=vecmin(d)); if ((#d > 2) && (md == 1) && (vecmax(d) == 1), return (0)); ); return (1);

%o isok(p) = isprime(p) && !isc(p) && isnotb(p); \\ _Michel Marcus_, May 01 2021

%Y Primes of the form (b^k-1)/(b-1) = A085104 (Brazilian primes).

%Y Primes of the form (c^q+1)/(c+1) = A059055.

%Y Primes of the form (b^k-1)/(b-1) and also (c^q+1)/(c+1): A002383 \ {3} is a subsequence, but, maybe the intersection (conjecture).

%Y Primes of the form (b^k-1)/(b-1) but not (c^q+1)/(c+1) = A225148.

%Y Primes of the form (c^q+1)/(c+1) but not (b^k-1)/(b-1) = A343774.

%Y Primes neither of the form (c^q+1)/(c+1) nor (b^k-1)/(b-1) = this sequence.

%K nonn,base

%O 1,1

%A _Bernard Schott_, Apr 29 2021