yeah ive got all that in my block explorer
just gotta figure out how to convert it into a prime number
EDIT:Anyone willing to provide me the code to convert those into a prime number for the block explorer, will get their name listed on the page for donations
This is a bitwin chain. Both n-1 and n+1 are prime, as well as 2n-1 and 2n+1.
This chain is 6 long, so if I understand correctly:
p === primeorigin
p1 = p + 1
p2 = p - 1
p3 = p * 2 + 1
p4 = p * 2 - 1
p5 = p * 4 + 1
p6 = p * 4 - 1
and so on.
In python:
def primeChain(origin, length):
primes = []
for i in range(length / 2):
primes.append(p * pow(2,i) + 1)
primes.append(p * pow(2, i) - 1)
return primes
primeChain(8965952996020407064364391577136065268670542909213664815741310568010946895662880601479081230, 6)
Or as a list comprehension:
primes = [[p * pow(2,i/2) + 1, p * pow(2,i/2) - 1] for i in range(length)]
Gives:
- 8965952996020407064364391577136065268670542909213664815741310568010946895662880 601479081231
- 8965952996020407064364391577136065268670542909213664815741310568010946895662880 601479081229
- 1793190599204081412872878315427213053734108581842732963148262113602189379132576 1202958162461
- 1793190599204081412872878315427213053734108581842732963148262113602189379132576 1202958162459
- 3586381198408162825745756630854426107468217163685465926296524227204378758265152 2405916324921
- 3586381198408162825745756630854426107468217163685465926296524227204378758265152 2405916324919
See for yourself! And happy priming, I still haven't found a block :/
EDIT: added code snippet
EDIT: helpful or interesting? send primecoins ASxa5AHJFHnpr47BMwKEZ4zksK57AJT6FT
Any idea how this works in relation to the 1CC and 2CC versions. It's my understanding that 1CC should use:
((previous number * 2) + 1)
And 2CC should use:
((previous number * 2) - 1)
But it doesn't seem to work. Take for example block 2003:
Prime Chain: 1CC08.339b77
Prime Origin: 9615572543071231184837168360004814554467140239322370722813195196221920358459324
7487894105484172550
[0] => Array
(
[number] => 192311450861424623696743367200096291089342804786447414456263903924438407169186494975788210968345101
[score] => 0
)
[1] => Array
(
[number] => 384622901722849247393486734400192582178685609572894828912527807848876814338372989951576421936690203
[score] => 0
)
[2] => Array
(
[number] => 769245803445698494786973468800385164357371219145789657825055615697753628676745979903152843873380407
[score] => 0
)
[3] => Array
(
[number] => 1538491606891396989573946937600770328714742438291579315650111231395507257353491959806305687746760815
[score] => 0
)
[4] => Array
(
[number] => 3076983213782793979147893875201540657429484876583158631300222462791014514706983919612611375493521631
[score] => 0
)
[5] => Array
(
[number] => 6153966427565587958295787750403081314858969753166317262600444925582029029413967839225222750987043263
[score] => 0
)
[6] => Array
(
[number] => 12307932855131175916591575500806162629717939506332634525200889851164058058827935678450445501974086527
[score] => 0
)
[7] => Array
(
[number] => 24615865710262351833183151001612325259435879012665269050401779702328116117655871356900891003948173055
[score] => 0
)
NOTE: score is the result of the php function
gmp_prob_prime() which seems to be pretty reliable for outputting 1 for the correct numbers in the bitwin results. This can be important when there are an odd number of primes in the chain.
Any idea where I'm going wrong here?