Problems & Puzzles: Puzzles

Puzzle 195. Primes such that their squares are free of the digit D.

Recently I tackled another interesting puzzle (** squares) from the always challenging pages of my friend Frank Rubin. Evidently this is a follow-up of that puzzle, transposed to the primes domain and with two conditions instead of one:

  • Here we will ask for primes p such that p2 is free of the digit D.
  • The prime p must be expressible in an algebraic elemental (closed) form like: k*2^n+1, 2^n-1, ... and so on.

A moderately large example of p such that p2 is free of the digit "0", is this one:

p = 116341819528815886843179274637 (30 digits)
P2 = 13535418971275565662513531286476476464956255941377471481769

 

Questions:

1. Find one titanic prime (digits=>1000) such that its square is free of the digit D, for each of the following values for D: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

2. Find one titanic prime of exactly 1000 digits such that its square is only free of the digit "zero"

3. Find one titanic palprime such that its square is free of the digit "zero"


Solution:

Shyam Sunder Gupta and J. K. Andersen sent solutions to this puzzle. The later found solution to all the questions asked.

S. S. Gupta wrote:

Regarding Q.1 For D=2,3,5,6,7,8, The Smallest Titanic Prime 10^999+7 is such that its square is free of digit D.

For D=4,9 , The Titanic Prime 10^999+3561 is such that its square is free of digit D.

A Titanic prime such that its square is free of D for D=1. This Titanic prime is: 2*10^999+8567

... the solution for D=0 can not be attempted without evolving some strategy to tackle most probable solutions only. Lets try and hope to find a solution.

 

J. K. Andersen wrote:

I have used Primeform/GW to find solutions and Primo to prove a few primes. Numbers with special decimal forms are requested and I have found the solutions by experimenting with such numbers and not much analysis.

1. Find one titanic prime (digits=>1000) such that its square is free of the digit D, for each of the following values for D: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

The digits here are covered by the following cases but my first test was: p = 10^999+7 is well-known as the smallest titanic prime. p^2 is free of the digits 2, 3, 5, 6, 7, 8.

p = 9*10^1058+1 is easily proven prime by Primeform with p-1 factored. p^2 is free of the digits 2, 3, 4, 5, 6, 7, 9.

p = 3*10^1137+7 is proven prime with Primo.

p^2 is free of the digits 1, 3, 5, 6, 7, 8.

p = (10^1000-1)/3+49*10^132 is proven prime with Primo.

p has exactly 1000 digits and p^2 is only free of the digit 0. p also answers question 2.

The 3 previous primes are my own finds covering all digits.

I also wanted a really big prime and looked at the top 5000 list at primes.utm.edu. I did not have to look far. Number 98 (list dated 18 Sep 2002): p = 105994*10^105994+1 is a 106000-digit Generalized Cullen prime found by Guenter Loeh and Yves Gallot (presumably Loeh was running proth.exe). A quick test shows that p^2 is missing the digit 5. I have not tested the bigger numbers but would be extremely surprised to see a missing digit in a square.

p = 10^69882+3*10^34941+1 with 69883 digits is the record palprime. It was found by Daniel Heuer with PrimeForm. p^2 is free of the seven digits 2, 3, 4, 5, 7, 8, 9.

2. Find one titanic prime of exactly 1000 digits such that its square is only free of the digit "zero"

(10^1000-1)/3+49*10^132 from question 1.

3. Find one titanic palprime such that its square is free of the digit "zero"

p = (10^1867-1)/3+4*10^933 is a probable prime.

p has 1867 digits, the middle is 7 and all others are 3.

p is a palprime - and also a near-repdigit prime.

p^2 is free of the digit 0 (but also of 4 and 6).

It would take around a day to prove p prime with Primo.

I omitted the proof and proved the next solution.

p = (10^1287-1)/3+313*10^642 is proven prime with Primo.

p is palindromic and p^2 is only free of the digit 0.

Let p(n) = (10^(2*n+3)-1)/3+313*10^n for n>2

The previous solution is p(642).

p(n) is always palindromic and p(n)^2 is always free of only the digit 0.

***

 

 

 



Records   |  Conjectures  |  Problems  |  Puzzles