A376118
Cryptarithmically unique palindromic primes.
Original entry on oeis.org
11, 11141414111, 11999199911, 13111311131, 1110110110111, 1141411141411, 1611116111161, 3113113113113, 3222223222223, 3533355533353, 7444477744447, 7767777777677, 7887787877887, 7999979799997, 9494994994949, 9779999999779, 118818181818811, 131133131331131, 944499494994449, 10000010101000001
Offset: 1
11141414111 is a term since it's a palindromic prime and no other prime has the same pattern "AAABABABAAA" of repeating digits.
Counterexample: the palindromic prime 131 is not a term since another prime 151 has the same pattern "ABA" of repeating digits.
Supersequence of
A004022 (prime repunits).
-
NumOfDigits = 13; (* Maximal integer length to be searched for *)
(* A function that calculates the canonical form A358497[n] *)
A358497[k_] := FromDigits@a358497C[k]
a358497C = Compile[{{k, _Integer}}, Module[{firstpos = ConstantArray[0, 10], digits = IntegerDigits[k], indx = 0}, Table[If[firstpos[[digits[[j]] + 1]] == 0, firstpos[[digits[[j]] + 1]] = Mod[++indx, 10]]; firstpos[[digits[[j]] + 1]], {j, Length[digits]}]]];
(* Extracting cryptarithmically uniqie terms from palindromic primes *)
UniquePalPrimes = {11};
Do[PalindromicPrimes = {}; CryptUnique = {};
Do[If[PrimeQ[#], AppendTo[PalindromicPrimes,{#, A358497[#]}]]&[n*10^(IntegerLength[n]-1) +
FromDigits@Rest@Reverse@IntegerDigits[n]], {n, 10^(k-1), 10^k-1}];
CryptUnique = Extract[Extract[Select[Tally[PalindromicPrimes, #1[[2]]==#2[[2]] &], #[[2]]==1 &], {All,1}], {All,1}];
UniquePalPrimes = Join[UniquePalPrimes, CryptUnique];
(* Prints the number of results and the list of results for every integer length *)
Print[{2k-1, Length[CryptUnique], CryptUnique}], {k, 2, (NumOfDigits+1)/2}];
UniquePalPrimes
A374267
Perfect squares whose pattern of identical digits is unique among the squares.
Original entry on oeis.org
1444, 7744, 14884, 19881, 29929, 37636, 40401, 44944, 46656, 55696, 66564, 69696, 116964, 133225, 136161, 144400, 166464, 190969, 202500, 219961, 224676, 225625, 261121, 276676, 277729, 300304, 339889, 407044, 438244, 473344, 511225, 525625, 544644, 553536, 555025, 556516, 585225
Offset: 1
The first cryptarithmically unique square is 38^2=1444. This means that no other square has the same digit pattern "ABBB".
Counterexample: 144=12^2 is not in this sequence because 400=20^2 is also a perfect square with the same digit pattern "ABB". Equivalently, A358497(144)=A358497(400)=122.
The alphametic puzzle SEA^2 = BIKINI has a solution 437^2 = 190969 (K=0, B=1, E=3, S=4, N=6, A=7, I=9). This solution is unique because 190969 is a term in this sequence.
Cf.
A374268 (bases of cryptarithmically unique squares).
Cf.
A374238 (cryptarithmically unique primes).
-
NumOfDigits = 4; (* Maximal integer length to be searched for *)
A358497[k_] := With[{pI = Values@PositionIndex@IntegerDigits@k}, MapIndexed[#1 -> Mod[#2[[1]], 10] &, pI, {2}] // Flatten // SparseArray // FromDigits];
Extract[Extract[Select[Tally[Table[{#, A358497[#]} &[i^2], {i, 1, 10^NumOfDigits - 1}], #1[[2]] == #2[[2]] &], #[[2]] == 1 &], {All, 1}], {All, 1}]
A376084
Number of cryptarithmically unique primes with n decimal digits.
Original entry on oeis.org
0, 1, 0, 0, 0, 0, 2, 1, 3, 18, 105
Offset: 1
a(2)=1 because the only cryptarithmically unique prime (A374238) with 2 digits is 11. Indeed, any other 2-digit natural number with the same pattern "AA" is divisible by 11, whereas no 2-digit prime with the pattern "AB" of two nonequal digits is cryptarithmically unique because there are 20 primes that share the same pattern (all 2-digit primes except 11).
a(3)=0 because there are no cryptarithmically unique primes (A374238) with 3 digits.
a(7)=2 because there are exactly two cryptarithmically unique primes with 7 digits, which are 3333311 and 7771717.
Showing 1-3 of 3 results.
Comments