Judagrali系列:问题。 [英] A Judagrali series: problem.

查看:48
本文介绍了Judagrali系列:问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Judagrali系列:

找到第4个素数N,使得N = NumberOfDigits(Q)其中N是素数且Q是

素数且其中Q = 2p -1其中P是素数。

示例第一素数N是2,因为2 = NumberOfDigits(31)因为2是素数而且

因为31 = 2 ^ 5 -1和因为5是素数。

我们正在寻找Judagrali系列中的第2,第3,第4素数N以及它的相应Q和P值的


提示:

1第4个N对应一个非常大的M.​​在进行

计算时考虑到这一点。

2计算效率很重要。

3必须使用面向对象和继承。即N是素数,Q的子集是
(子类),Q也是素数,P的子集也是素数。

解决方案


一个Judagrali系列:

找到第四个素数N,使得N = NumberOfDigits(Q)其中N是素数且Q是

素数且其中Q = 2p-1其中P为素数。

示例第一素数N为2,因为2 = NumberOfDigits(31)因为2是素数且

因为31 = 25-1而因为5是素数。

我们正在寻找Judagrali系列中的第2,第3,第4素数N以及它的

对应的Q和P值。

提示:

1第4 N对应一个非常大的M.​​在做
计算。

2计算效率很重要。

3必须使用面向对象和继承。即,N是素数,Q的子集是
(子类),Q也是素数,而P的子集也是素数。



这看起来不合适。你有


因为31 = 25-1因为5是素数。



这可能不正确。



看起来不对这里。你有



那是不正确的。



它是2到5而不是25


所以Q =(2 ^ p) - 1?

A Judagrali series:
Find the 4th prime number N such that N=NumberOfDigits(Q) where N is prime AND Q is
prime AND where Q=2p-1 where P is prime.
Example the 1st prime number N is 2, because 2=NumberOfDigits(31) because 2 is prime and
because 31=2^5-1 and because 5 is prime.
We are looking for the 2nd,3rd, 4th prime number N in the Judagrali series as well as its
corresponding Q and P values.
Hints:
1 The 4th N corresponds to a very large M. Take this into account when doing the
calculation.
2 Computational efficiency is important.
3 Object orientation and inheritance MUST be used. i.e. N is a prime, and a subset
(subclass) of Q, Q is also prime and a subset of P which is also prime.

解决方案

A Judagrali series:
Find the 4th prime number N such that N=NumberOfDigits(Q) where N is prime AND Q is
prime AND where Q=2p-1 where P is prime.
Example the 1st prime number N is 2, because 2=NumberOfDigits(31) because 2 is prime and
because 31=25-1 and because 5 is prime.
We are looking for the 2nd,3rd, 4th prime number N in the Judagrali series as well as its
corresponding Q and P values.
Hints:
1 The 4th N corresponds to a very large M. Take this into account when doing the
calculation.
2 Computational efficiency is important.
3 Object orientation and inheritance MUST be used. i.e. N is a prime, and a subset
(subclass) of Q, Q is also prime and a subset of P which is also prime.

Doesn''t look right here. You''ve got

because 31=25-1 and because 5 is prime.

That cannot be correct.


Doesn''t look right here. You''ve got


That cannot be correct.


it is 2 to the power 5 not 25


So Q = (2^p) - 1 ?


这篇关于Judagrali系列:问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆