I am given a number, I don't know whether it's prime or not. The algo says,
For eg -
Step 1 - Convert char to ints. (Hello - 72101108108111) Ascii values
Step 2 - Make a large number.
- Convert char to ints. (Hello - 72101108108111) Ascii values
- Make a larger number (72101108108111).
- Make this number a prime by adding more digits.
.
.
.
.
I want to know, how the algo expects to add some more digits to the right , So I would get a prime?
What I would do is the following :
Making the number of the form $6k+1$ prevents the number you create to be divisible by $2$ and $3$ and increases the probability that you find a prime number.
EDIT : Unfortunately this doesn't work for all numbers. I would advise you to test all odd numbers (not multiples of 5) that can be produced by concatenating numbers at the right, in the increasing order, and testing each one of them with a primailty test, as in Charles' answer.