Skip to main content
The National Cipher Challenge

Reply To: Programming

A Tale of 2 Secrets Forums T.E.M.P.E.S.T. Programming Reply To: Programming

#112851
ByteInBits
Participant

@Robb27
Correct answers from nice clear code.

Do I recall correctly that you sometimes use PARI/gp?

I left off using python for gp, here is my code:

\\ PARI/GP Calculator Version 2.13.3 Code
{
forprime(p=1009,99973,
v=digits(p);
a=fromdigits(v[2..4]);b=fromdigits(v[3..4]);c=v[4];
d=fromdigits(v[1..3]);e=fromdigits(v[1..2]);f=v[1];
if(isprime(a)&&isprime(b)&&isprime(c)&&isprime(d)&&isprime(e)&&isprime(f),
print1(” “p))
)
}
3137 3797

Report a problem