Moaña and the Crab.
An informal essay on machines performing arithmetic and subarithmetic
operations with special
attention to the factoring problem.
by
Jacques BASALDÚA
Jacques Basaldúa (c) 2001 |
Depósito Legal GC-6519/01 |
***· ***·· ***··· ***····
***· ***·· ***··· ***····
***· ***·· ***··· ***····
···· ····· ······ ·······
····· ······ ·······
······ ·······
·······
he concludes that
"the difference between two squares is the sum of consecutive odd numbers."
let c=0 // A carry register
for i=0 to 2k-1 do begin // All bits starting with the least sig. The result has 2k bits.
if ei+c is odd -> fpi is 1
else -> fpi is 0
let c = »(ei+c) // » means shift 1 bit to the right. (Unsigned div by 2)
end
This algorithm
is also the heart of the Crab, a circuit that computes the modular inverse of a number modulo 2¥
, which will be studied in chapter 5.| The logic part of the multiplication machine
is computing e from q and d. en = S (i=0,n) of di·qn-i . |
The arithmetic part of the multiplication machine
is computing fp from e.
let c=0
for i=0 to 2k-1 do begin
if ei+c is odd -> fpi is 1
else -> fpi is 0
let c = »(ei+c)
end
|


m0 = q0·d0 = 1 (carrying = 0)
m1 = q1·d0 ± q0·d1 = 0·1 ± 1·d1 = 1 -> d1 = 1, carrying = 0
m2 = q2·d0 ± q1·d1 ± q0·d2 = 1·1 ± 0·1 ± 1·d2 = 0 -> d2 = 1, carrying = 1
(Note: d2=0 would make e2 odd and m2 = 1, d2=1 makes e2=2 m2=0 and carries »e2 = »2 = 1)
m3 = q3·d0 ± q2·d1 ± q1·d2 ± q0·d3 = 1·1 ± 1·1 ± 0·1 ± 1·d3 = 1 -> d3 = 0, carrying 1
(Note: e3 = 1 (carried) + 2 + 0, d3=1 would make e3 even -> m3=0, carries »e3 = »3 = 1)
m4 = q3·d1 ± q2·d2 ± q1·d3 ± q0·d4 = 1·1 ± 1·1 ± 0·0 ± 1·d4 = 1 -> d4 = 0, carrying 1
m5 = q3·d2 ± q2·d3 ± q1·d4 ± q0·d5 = 1·1 ± 1·0 ± 0·0 ± 1·d5 = 0 -> d5 = 0, carrying 1
m6 = q3·d3 ± q2·d4 ± q1·d5 ± q0·d6 = 1·0 ± 1·0 ± 0·0 ± 1·d6 = 1 -> d6 = 0, carrying 0
RL division makes part of Moaña
expressions, and it will be formalized later (see 4.1)| a RLdiv b computed up to k bits = the product of a times the modular inverse of b modulo 2k. |
| 1 RLdiv b is the modular inverse of b modulo 2k. |
| PF(n) = 1 RLdiv n computed for an ¥ number of bits. |
| The period (length of the repeated pattern) of the periodic form of an odd number n is ß(n). Which, until now, we had defined as "the order of the subgroup of the powers of 2 modulo n". |
// 0. Prolog to make the algorithm applicable to even numbers
if m is even -> begin
let zr = the number of consecutive least significant zeros of m.
if zr is odd -> return an error // The number is not a square.
let r = 2zr/2 // r is stored to multiply the result obtained at the end
let m = m SHR zr // shift m zr bits to the right converting it into an odd number
end
// 1. The main body
let Q = 1 // Variable containing the square root while it is computed
let j = 1 // Index to the "first candidate" bit
let f = numBits(M) DIV 2 // Index to the "last candidate" bit.
|
+---------->+
| |
| if j>f -> Halt // M is not a square
| |
| [Compute M RLdiv Q from bit j
| until a bit being 1 is found.
| let k be the index of that bit]
| |
| if k=f -> goto 2.
| |
| if k - 1 = j -> Halt // M is not a square
| |
| let j = k - 1
| let Q = Q + 2j
| |
+-----------+
// 2. The end
[Compute the remaining bits of M RLdiv Q]
if any of the bits is non zero -> Halt // M is not a square
if some r was defined in step 0 -> let Q = r·Q
return Q
|
| A fact has to be mentioned: if Q is congruent with 3 modulo 4 (remember M cannot be congruent with 3 modulo 4, but Q can), the method cannot be applied to determine the first bit. This can be verified after the algorithm fails. If the algorithm fails (only the first time) try setting Q as 11 and proceeding with the algorithm normally. I did not reflect this in pseudocode to keep it simple. |
CONSTANTS |
No aliases are allowed. Constants are defined by their numeric value.
Binary constants: 0 or 1 Longint constants: Any positive value from 0 to 2147483648 (231) |
VARIABLES |
Variables are either vectors of binary values or vectors of longint values.
Variables are identified by one letter (the entire vector) or one letter followed by a number (the index of the specified element). No spaces or brackets are required or allowed to separate the index. E.g. q0 is the least significant bit of a vector q. a11+q1·(q2+!e7) is a valid expression. The letters a, b, d, e, g, h, j, k, m, n, p, q, s, t, x, y, z are used to define vectors of binary values. (Only m, q, h & d are used by the Moaña formulae, the others may be used freely.) The letters c, f, i, l, o, r, u, v, w are used to define vectors of longint values. (Only c is used by the Moaña formulae, the others may be used freely.) Of course, variables may contain either constant values or valid expressions. |
UNARY OPERATORS |
The following three operators apply to the immediately following variable or expression in
brackets. ! binary not. If applied to a longint, the returned result is binary. Only the least significant bit of the longint is considered. « Arithmetic shift to the left. Same as unsigned multiplication by 2. E.g. «3 returns 6 » Arithmetic shift to the right. Same as unsigned division by 2. E.g. »7 returns 3, »»8 returns 2 |
BINARY OPERATORS |
The following four operators apply between the previous variable or expression in brackets
and the following. · Binary and. E.g. q11·q7 is a valid expression. q2·!q2 returns 0. If applied to longint, converts the result to binary. + Binary or. De Morgan in this notation: q1+q2 = !(!q1·!q2). If applied to longint, converts the result to binary. × Binary xor. q1×q2 = (q1+q2)·!(q1·q2) = q1·!q2+!q1·q2.If applied to longint, converts the result to binary. ± Arithmetic sum. E.g. 1±0±0±1±0 returns 2. Also, 7±11±2 returns 20. If applied to binary variables, their 1 or 0 values are treated as longint. The result is always longint. |
BRACKETS |
Two types of brackets are used: Local brackets: ( and ) are used as in any normal notation to change evaluation priority. Global brackets: Only < is used. It means, all the remaining expression acts as an atom until the end. q1·(q2+q3) = q1·<q2+q3 Since expressions may contain thousands of characters, this notation immediately shows that q1 "ands" the whole expression. |
PRIORITY |
Unless otherwise indicated by local or global brackets, there are three levels of
priority: ! « » Maximum · Medium + × ± Lowest !q1·q2·q3+!q1·!q2·q3 is the same as (!(q1)·q2·q3)+(!(q1)·!(q2)·q3). Needless brackets are removed automatically. |
| m (The module) | Since m is known (the number we pretend to factor), it is replaced by the constants values 0 or 1 bit by bit before starting the analysis. It can also be left unknown by just assigning variable names m1, m2, m3, ... to the vector. (m0 is assumed to be 1, since RL division is not defined for even numbers.) |
| q (The factor) | The factor is usually unknown. The vector fields are filled with 1, q1, q2, q3, ... (q0 is 1 as mentioned) before starting the analysis. |
| c (Carried product) | This is the only vector of longint.
All the others are vectors of boolean. The carried product of d and q is derived from the extended product. The extended product is en = S (i=0,n) of di·qn-i The extended product makes sense by itself and has interesting properties, the carried product does not make sense by itself, but its least significant bit is equal to the corresponding bit of the arithmetic product (the ordinary product). D e f i n i t i o n : if n=0 co = 1 else cn = ( S (i=0,n) of di·qn-i)±»cn-1 E.g. c3 is d0·q3±d1·q2±d2·q1±d3·q0±»c2 (The S notation is not understood by the SM system. A Pascal procedure creates all "d0·q3±d1·q2±d2·q1±d3·q0±»c2 "-like expressions before starting the analysis.) |
| h (Incomplete carried product) | This is the carried product of d and q
computed up to the previous bit (i.e. n-1) and applied to n. Since only the least significant bit is
interesting, its is converted to binary by an AND operation. D e f i n i t i o n : case n=0 ho = 1 case n=1 h1 = 0 else hn = 1·((S (i=1,n-1) of di·qn-i))±»cn-1) E.g. h3 is 1·(d1·q2±d2·q1±»c2) (The S notation is not understood by the SM system. A Pascal procedure creates all "1·(d1·q2±d2·q1±»c2) "-like expressions before starting the analysis.) |
| d (The RL division) | Is the RL division of m by q. D e f i n i t i o n : dn = hn×mn×qn E.g. d3 is h3×m3×q3 |
| fb (Factor bits) | Is the number of bits of the factor. Of course, it has to be guessed. The smaller the better. It can obviously not be smaller than the number of bits of the module/2 and should not be as big, since it would make the trivial divisors 1 and m a solution of Mo. |
| Mo (Moaña) | As mentioned, Mo is the analytic factorization of a number.
D e f i n i t i o n : Mo = AND(i=fb, 2fb - 1) of !di E.g. if fb = 6 then Mo = !d6·!d7·!d8·!d9·!d10·!d11 If the number is prime, Mo = 0, else Mo is the product sum of all its factors fitting in fb bits (factor and cofactor). |
c0 = 1
c1 = d0·q1±d1·q0±»c0
c2 = d0·q2±d1·q1±d2·q0±»c1
c3 = d0·q3±d1·q2±d2·q1±d3·q0±»c2
c4 = d0·q4±d1·q3±d2·q2±d3·q1±d4·q0±»c3
c5 = d0·q5±d1·q4±d2·q3±d3·q2±d4·q1±d5·q0±»c4
c6 = d0·q6±d1·q5±d2·q4±d3·q3±d4·q2±d5·q1±d6·q0±»c5
c7 = d0·q7±d1·q6±d2·q5±d3·q4±d4·q3±d5·q2±d6·q1±d7·q0±»c6
c8 = d0·q8±d1·q7±d2·q6±d3·q5±d4·q4±d5·q3±d6·q2±d7·q1±d8·q0±»c7
c9 = d0·q9±d1·q8±d2·q7±d3·q6±d4·q5±d5·q4±d6·q3±d7·q2±d8·q1±d9·q0±»c8
c10 = d0·q10±d1·q9±d2·q8±d3·q7±d4·q6±d5·q5±d6·q4±d7·q3±d8·q2±d9·q1±d10·q0±»c9
c11 = d0·q11±d1·q10±d2·q9±d3·q8±d4·q7±d5·q6±d6·q5±d7·q4±d8·q3±d9·q2±d10·q1±d11· q0±»c10
h0 = 1
h1 = 0
h2 = 1·((d1·q1)±»c1)
h3 = 1·((d1·q2±d2·q1)±»c2)
h4 = 1·((d1·q3±d2·q2±d3·q1)±»c3)
h5 = 1·((d1·q4±d2·q3±d3·q2±d4·q1)±»c4)
h6 = 1·((d1·q5±d2·q4±d3·q3±d4·q2±d5·q1)±»c5)
h7 = 1·((d1·q6±d2·q5±d3·q4±d4·q3±d5·q2±d6·q1)±»c6)
h8 = 1·((d1·q7±d2·q6±d3·q5±d4·q4±d5·q3±d6·q2±d7·q1)±»c7)
h9 = 1·((d1·q8±d2·q7±d3·q6±d4·q5±d5·q4±d6·q3±d7·q2±d8·q1)±»c8)
h10 = 1·((d1·q9±d2·q8±d3·q7±d4·q6±d5·q5±d6·q4±d7·q3±d8·q2±d9·q1)±»c9)
h11 = 1·((d1·q10±d2·q9±d3·q8±d4·q7±d5·q6±d6·q5±d7·q4±d8·q3±d9·q2±d10·q1)±»c10)
d0 = h0×m0×q0
d1 = h1×m1×q1
d2 = h2×m2×q2
d3 = h3×m3×q3
d4 = h4×m4×q4
d5 = h5×m5×q5
d6 = h6×m6×q6
d7 = h7×m7×q7
d8 = h8×m8×q8
d9 = h9×m9×q9
d10 = h10×m10×q10
d11 = h11×m11×q11
h0 = 1
d0 = 1
c0 = 1
h1 = 0
d1 = q1
c1 = «q1
h2 = 0
d2 = q2
c2 = q2±q1·q1±q2±q1
h3 = q1×q2
d3 = q1×q2×q3
c3 = q3±q1·q2±q2·q1±(q1×q2×q3)±»<q2±q1·q1±q2±q1
h4 = !q1·q3·!q2+q1·!q3·q2
d4 = q4×!<!q1·q3·!q2+q1·!q3·q2
c4 = q4±q1·q3±q2·q2±(q1×q2×q3)·q1±(q4×!(!q1·q3·!q2+q1·!q3·q2))±»<q3±q1·q2±q2·q1±(q1Œq2Œq3)± »<q2±q1·q1±q2±q1
h5 = q1·!q4·q2·!q3+!q1·q4·!q2·q3
d5 = q5×<q1·!q4·q2·!q3+!q1·q4·!q2·q3
c5 = q5±q1·q4±q2·q3±(q1×q2×q3)·q2±(q4×!(!q1·q3·!q2+q1·!q3·q2))·q1±(q5×(q1·!q4·q2·!q3+!q1·q4·!q2· q3))±»<q4±q1·q3±q2·q2±(q [Truncated]
h6 = q1·!q5·!q2·!q4·!q3+!q1·q5·!q2·!q4·!q3+!q1·q5·q2·!q4·!q3+q1·!q5·!q2·q4·!q3+!q1·q5·!q2·q4·!q3+!q1· q5·q2·q4·!q3+q1·q5· [Truncated]
d6 = !<q1·!q5·!q2·!q4·!q3+!q1·q5·!q2·!q4·!q3+!q1·q5·q2·!q4·!q3+q1·!q5·!q2·q4·!q3+!q1·q5·!q2·q4·!q3+!q1· q5·q2·q4·!q3+q1·q [Truncated]
c6 = q1·q5±q2·q4±(q1×q2×q3)·q3±(q4×!(!q1·q3·!q2+q1·!q3·q2))·q2±(q5×(q1·!q4·q2·!q3+!q1·q4·!q2·q3))· q1±!(q1·!q5·!q2·!q4·!q [Truncated]
h7 = !<!q2·!q5·!q1·!q3·!q4+!q2·q5·!q1·!q3·!q4+!q2·!q5·q1·!q3·!q4+!q2·!q5·!q1·q3·!q4+q2·!q5·!q1·q3·!q4+q2· q5·!q1·q3·!q4+! [Truncated]
d7 = !q2·!q5·!q1·!q3·!q4+!q2·q5·!q1·!q3·!q4+!q2·!q5·q1·!q3·!q4+!q2·!q5·!q1·q3·!q4+q2·!q5·!q1·q3·!q4+q2· q5·!q1·q3·!q4+!q2 [Truncated]
c7 = q2·q5±(q1×q2×q3)·q4±(q4×!(!q1·q3·!q2+q1·!q3·q2))·q3±(q5×(q1·!q4·q2·!q3+!q1·q4·!q2·q3))· q2±!(q1·!q5·!q2·!q4·!q3+!q1· [Truncated]
h8 = q1·!q2·!q3·!q5·!q4+!q1·q2·!q3·!q5·!q4+q1·q2·q3·!q5·!q4+!q1·q2·q3·q5·!q4+q1·q2·!q3·!q5· q4+!q1·!q2·q3·!q5·q4+q1·!q2·q [Truncated]
d8 = q1·!q2·!q3·!q5·!q4+!q1·q2·!q3·!q5·!q4+q1·q2·q3·!q5·!q4+!q1·q2·q3·q5·!q4+q1·q2·!q3·!q5· q4+!q1·!q2·q3·!q5·q4+q1·!q2·q [Truncated]
c8 = (q1×q2×q3)·q5±(q4×!(!q1·q3·!q2+q1·!q3·q2))·q4±(q5×(q1·!q4·q2·!q3+!q1·q4·!q2·q3))·q3± !(q1·!q5·!q2·!q4·!q3+!q1·q5·!q2 [Truncated]
h9 = !q4·!q1·!q3·q2·!q5+!q4·q1·!q3·q2·!q5+q4·q1·!q3·q2·!q5+!q4·!q1·q3·q2·!q5+!q4·!q1·!q3·!q2·q5+q4·!q1· !q3·!q2·q5+q4·q1· [Truncated]
d9 = !q4·!q1·!q3·q2·!q5+!q4·q1·!q3·q2·!q5+q4·q1·!q3·q2·!q5+!q4·!q1·q3·q2·!q5+!q4·!q1·!q3·!q2·q5+q4·!q1· !q3·!q2·q5+q4·q1· [Truncated]
c9 = (q4×!(!q1·q3·!q2+q1·!q3·q2))·q5±(q5×(q1·!q4·q2·!q3+!q1·q4·!q2·q3))·q4±!(q1·!q5·!q2·!q4·!q3+!q1·q5· !q2·!q4·!q3+!q1·q [Truncated]
h10 = !q5·q1·!q4·!q2·!q3+!q5·!q1·q4·!q2·!q3+q5·q1·q4·!q2·!q3+!q5·q1·q4·q2·!q3+!q5·!q1·!q4·!q2·q3+!q5· !q1·q4·!q2·q3+q5·!q [Truncated]
d10 = !q5·q1·!q4·!q2·!q3+!q5·!q1·q4·!q2·!q3+q5·q1·q4·!q2·!q3+!q5·q1·q4·q2·!q3+!q5·!q1·!q4·!q2·q3+!q5· !q1·q4·!q2·q3+q5·!q [Truncated]
c10 = (q5×(q1·!q4·q2·!q3+!q1·q4·!q2·q3))·q5±!(q1·!q5·!q2·!q4·!q3+!q1·q5·!q2·!q4·!q3+!q1·q5·q2·!q4· !q3+q1·!q5·!q2·q4·!q3+ [Truncated]
h11 = !q1·q5·!q2·!q4·!q3+!q1·q5·q2·!q4·!q3+q1·q5·q2·!q4·!q3+q1·!q5·q2·q4·!q3+!q1·q5·q2·q4·!q3+!q1· !q5·!q2·!q4·q3+q1·q5·! [Truncated]
d11 = !<!q1·q5·!q2·!q4·!q3+!q1·q5·q2·!q4·!q3+q1·q5·q2·!q4·!q3+q1·!q5·q2·q4·!q3+!q1·q5·q2·q4·!q3+!q1· !q5·!q2·!q4·q3+q1·q5 [Truncated]
c11 = !(q1·!q5·!q2·!q4·!q3+!q1·q5·!q2·!q4·!q3+!q1·q5·q2·!q4·!q3+q1·!q5·!q2·q4·!q3+!q1·q5·!q2·q4·!q3+!q1· q5·q2·q4·!q3+q1· [Truncated]
Mo =
!!(q1·!q5·!q2·!q4·!q3+!q1·q5·!q2·!q4·!q3+!q1·q5·q2·!q4·!q3+q1·!q5·!q2·q4·!q3+!q1·q5·!q2·q4·!q3+!q1·
q5·q2·q4·!q3+q1·q5·q2·q4·!q3+·
[Truncated]
h0 = 1
d0 = 1
c0 = 1
h1 = 0
d1 = q1
c1 = «q1
h2 = 0
d2 = !q2
c2 = 1±«q1
h3 = 0
d3 = q3
c3 = q3±q1±q3±»<1±«q1
h4 = q1×q3
d4 = q1×q3×q4
c4 = q4±q1·q3±q3·q1±(q1×q3×q4)±»<q3±q1±q3±»<1±«q1
h5 = !q1·q4·!q3+q1·!q4·q3
d5 = q5×!<!q1·q4·!q3+q1·!q4·q3
c5 = q5±q1·q4±!q2·q3±q3·q2±(q1×q3×q4)·q1±(q5×!(!q1·q4·!q3+q1·!q4·q3))±»<q4±q1·q3±q3·q1± (q1×q3×q4)±»<q3±q1±q3±»<1±«q1
...
Mo =
!(!q1·!q9·!q2·!q8·!q3·!q7·!q4·!q6·!q5+q1·q9·!q2·!q8·!q3·!q7·!q4·!q6·!q5+q1·!q9·q2·!q8·!q3·
!q7·!q4·!q6·!q5+!q1·q9·q2·!q8·!
[Truncated]
| 1 RLdiv n is the modular inverse of n modulo 2k. |
| PF(n) = 1 RLdiv n computed for an ¥ number of bits. |

| Any odd number n of bit length nb has only one periodic form PF(n). I.e., one unique inverse modulo 2¥ . |
write tapeo = 1
let carry = 0 // Carry register
let ncoo = 0 // Number of Consecutive Output Ones
let nb = number of bits of n
let tpi = 1 // tape index of output bit being written, tapeo = 1
loop
let carry = (carry DIV 2) + SUM(i=1 to nb-1) of ni and tapetpi-i
if carry is odd
begin
write tapetpi = 1
let carry = carry + 1
let ncoo = ncoo + 1
end
else begin
write tapetpi = 0
if ncoo = nb - 1 then Halt
let ncoo = 0
end
let tpi = tpi + 1
end
The only part requiring some extra attention is:
let carry = (carry DIV 2) + SUM(i=1 to nb-1) of ni and tapetpi-i
1. This counts the number of simultaneous 1(in n) 1(in the tape) occurrences. (The counting AND)
PF( 3) = *-
PF( 5) = -**-
PF( 7) = **-
PF( 9) = --***-
PF(11) = *---*-***-
PF(13) = -*---**-***-
PF(15) = ***-
PF(17) = ---****-
PF(19) = *-**----*-*--****-
PF(21) = -****-
PF(23) = **--*-****-
PF(25) = --*-*----***-*-****-
PF(27) = *--*----*-**-****-
PF(29) = -*-**---*----**-*--***-****-
PF(31) = ****-
d1 d2 d3 d4 d5 d6 d7 d8 d9 . . .
- - - - - - - - - - -
* - * - * - * - * - *
* * - - * * - - * *
* - * * - * * - * *
* * * - - - * * *
- - * - * * * - *
- - - * * - * * *
* - * * * - * * *
* * * * - - - -
* - - - - * - *
* * - - * * * *
- * - * * * * -
- * - - - - * *
* - - - - * - *
* * - - - * - -
* - * * * * - *
* * * * * - -
|
3 : *-
5 : -**-
7 : **-
9 : --***-
11 : *---*-***-
13 : -*---**-***-
15 : ***-
17 : ---****-
19 : *-**----*-*--****-
21 : -****-
23 : **--*-****-
25 : --*-*----***-*-****-
27 : *--*----*-**-****-
29 : -*-**---*----**-*--***-****-
31 : ****-
33 : ----*****-
35 : *-*---*****-
37 : -**-*-***-**-----**--*-*---*--*****-
39 : **-*--*****-
41 : --**-----***--*****-
43 : *-----*-*****-
45 : -*--*-*****-
47 : ***--**-**---*-*-*****-
49 : ---*-**---**-*-*****-
51 : *-*****-
observing the periodic forms vertically, the following properties can be noticed.
d1 = q1
d2 = q2
d3 = q1×q2× q3
d4 = q4×<!q1·q3·!q2+q1·!q3·q2
d5 = q5×!<!q1·!q4·!q2·!q3+q1·q4·!q2·!q3+!q1·!q4·q2·!q3+q1·q4·!q2·q3+!q1·!q4·q2·q3+q1· q4·q2·q3
...
dn = qn×< ...
#---## 35 :12:#-#---#####-
#--### 39 :12:##-#--#####-
35 < 39 the only difference is bit 2, computing the PF until bit 2 produces PF(35)
#-#, PF(39) ##- , until then, PF(35) > PF(39), but the next bits will always correct this and, at the end, PF(35) < PF(39).
#-----##-##--##-#----###-#= 34445853 :36:-#-##-----#########################-
#----#-#----------#----#-#= 34865285 :36:-##--#----#########################-
#--#-#-#-#-####-#-#-#-##-#= 39156397 :36:-#--#--#--#########################-
#--#-####--###-##-#-######= 39745215 :36:#####--#--#########################-
#--###-#-###---##--#######= 41272959 :36:######-#--#########################-
#-#------#-#-#-#--#-##-#-#= 42030261 :36:-###--##--#########################-
#-#-#-##----------#-#-#-##= 44826795 :36:#-------#-#########################-
#-##-#-##-#-#-#--#####-#-#= 47622645 :36:-###-#--#-#########################-
#-###---##########-#---###= 48496455 :36:##-###--#-#########################-
#-####-#----------#-####-#= 49545405 :36:-#-#--#-#-#########################-
##----------##----------##= 50343939 :36:#-#-#-#-#-#########################-
##--#-#--##-##-##----#---#= 53065233 :36:---####-#-#########################-
##-#-#---#----##--#-#--#-#= 55643301 :36:-##-#--##-#########################-
##-##-##----------##-##-##= 57409755 :36:#--#-#-##-#########################-
###-####-##--##-#-#---#--#= 62757513 :36:--###-###-#########################-
A proof for this could
be found analyzing PF as the binary digits of 1/n.##############- (1 -> 0 zeros to the left, total length = 15 matched by adding 1s) --############- (3 -> 2 zeros to the left, total length = 15 matched by adding 1s) ----##########- (5 -> 4 zeros to the left, total length = 15 matched by adding 1s)The complete list of PFs whose ß is 15 is:
number (bin) number ß PF(n)
#--#-### = 151(p) : 15 : ##--#--#######- (NOT generated by this rule)
##-##--# = 217 : 15 : --#-##-#######- (NOT generated by this rule)
#----#----# = 1057 : 15 : ----##########-
#--#--#--#--# = 4681 : 15 : --############-
############### = 32767 : 15 : ##############-
As shown above, the corresponding numbers are as
100100100 1. A 1
followed by j zeros, repeated k times, finished by 1.| ß((1 followed by j zeros) repeated k times and ended by 1) = (k+1)·(j+1) |
#-------# = 257(p) : 16 : -------########-
##------## = 771 : 16 : #-#-#-#########-
#-#-----#-# = 1285 : 16 : -##--##########-
####----#### = 3855 : 16 : ###-###########-
#---#---#---# = 4369 : 16 : ---############-
##--##--##--## = 13107 : 16 : #-#############-
#-#-#-#-#-#-#-# = 21845 : 16 : -##############-
################ = 65535 : 16 : ###############-
#---------------# = 65537(p) : 32 : ---------------################-
##--------------## = 196611 : 32 : #-#-#-#-#-#-#-#################-
#-#-------------#-# = 327685 : 32 : -##--##--##--##################-
####------------#### = 983055 : 32 : ###-###-###-###################-
#---#-----------#---# = 1114129 : 32 : ---####----####################-
##--##- |