A094335 Largest right-truncatable prime number in base n if 1 is considered as a prime (written in base 10).
47, 71, 2039, 2437, 108863, 33487, 4497359, 1355840309, 1979339339, 6774006887, 2081628860747539, 122311273757, 6525460043032393259, 927920056668659, 1429175974256442233, 4928397730238375565449, 5228233855704101657
Offset: 2
Examples
Example for n=10: 1,19,197,1979,19793,197933,1979339,19793393,197933933 and 1979339339 are all prime numbers.
Links
- Max Alekseyev, Table of n, a(n) for n = 2..75
- I. O. Angell, and H. J. Godwin, On Truncatable Primes, Math. Comput. 31, 265-267, 1977.
- Domingo Gómez-Pérez, Alina Ostafe, Min Sha, The Arithmetic of Consecutive Polynomial Sequences over Finite Fields, arXiv:1509.01936 [math.NT], 2015.
- A. J. van der Poorten, A quote, Math. Intelligencer 7(2) (1985), 40.
- Index entries for sequences related to truncatable primes
Crossrefs
Cf. A023107 (where 1 is not considered to be prime).
Programs
-
PARI
a(n) = my(S,m,D); D=select(x->(gcd(x,n)==1),vector(n-1,j,j)); S=concat([1],select(ispseudoprime,vector(n,j,j))); while(#S, m=vecmax(S); S=concat(vector(#D,j,select(ispseudoprime,vector(#S,i,S[i]*n+D[j]))));); m /* Max Alekseyev, Dec 06 2014 */