OFFSET
1,1
COMMENTS
The digit pattern for any natural number n is uniquely defined by the canonical form A358497(n), which enumerates digits according to their position of first occurrence. Each prime in this sequence has a unique digit pattern in the sense that no other prime has the same pattern.
Prime repunits (A004022) are a subsequence, as they are the sole primes with a single distinct digit.
A cryptarithm (alphametic) expresses a digit pattern in letters, where each distinct letter is to map to a distinct digit.
If a cryptarithmetic problem calls for a prime number, then the primes in this sequence are unique solutions, so we call these primes cryptarithmically unique.
The smallest term with 3 distinct digits is 1151135331533311.
The number of terms of length n is given by A376084(n).
LINKS
Dmytro Inosov, Table of n, a(n) for n = 1..154
Dmytro Inosov, Table of n, a(n) for n = 1..24840
Dmytro S. Inosov and Emil Vlasák, Cryptarithmically unique terms in integer sequences, arXiv:2410.21427 [math.NT], 2024.
Wikipedia, Verbal arithmetic.
EXAMPLE
11 is a term since no other prime has the same pattern "AA" of two identical digits (any other AA is divisible by A > 1, hence nonprime).
Counterexample: 13 is not a term since another prime 17 has the same pattern "AB" of two nonidentical digits.
7771717 is a term since it's prime and no other prime has the same pattern "AAABABA".
MATHEMATICA
NumOfDigits = 10; (*Maximal integer length to be searched for*)
A358497[k_] :=
FromDigits[
Table[Mod[
CountDistinct[Take[#, FirstPosition[#, #[[i]]][[1]]]] &[
IntegerDigits[k]], 10], {i, 1, IntegerLength[k]}]];
A006880[MaxLen_] := PrimePi[10^MaxLen];
Extract[Select[
Tally[Table[{#, A358497[#]} &[Prime[i]], {i, 1,
A006880[NumOfDigits]}], #1[[2]] == #2[[2]] &], #[[2]] == 1 &], {All, 1}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Dmytro Inosov, Jul 01 2024
STATUS
approved