OFFSET
1,1
COMMENTS
The smallest prime with this property is 55511. Since being primes, the terms of this sequence end in 1, 3, 7 or 9. Unlike A371879, the penultimate digit can be 0. For example, 3388907 is a term whose penultimate digit is 0.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
55511 is a term, because it is a prime number such that if the 5 is removed, the result is 5511 = 3 * 11 * 167, while if the 1 is removed, the result is 5551 = 7 * 13 * 61.
MATHEMATICA
sphenicQ[n_] := FactorInteger[n][[;; , 2]] == {1, 1, 1}; q[n_] := AllTrue[FromDigits@ Drop[IntegerDigits[n], {#}] & /@ Range[IntegerLength[n]], sphenicQ]; Select[Prime[Range[200000]], q] (* Amiram Eldar, Dec 09 2024 *)
PROG
(PARI) has(n)=my(d=digits(n), t=2^#d-1); if(factor(fromdigits(vecextract(d, t-1)))[, 2]!=[1, 1, 1]~, return(0)); for(i=1, #d-1, if(d[i]==d[i+1], next); if(factor(fromdigits(vecextract(d, t-1<<i)))[, 2]!=[1, 1, 1]~, return(0))); 1
select(has, primes(10^6)) \\ Charles R Greathouse IV, Dec 09 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gonzalo Martínez, Dec 09 2024
STATUS
approved