Thursday, December 30, 2004
Platykurtosis
Circle, ellipse, ...
Monday, December 20, 2004
Primitive Roots of Selected Large Primes
Prime | Minimum Generator | Approx log2 |
---|---|---|
59656*2^59656+1 | 3 | 59671.9 |
32292*2^32292+1 | 5 | 32307.0 |
18496*2^18496+1 | 3 | 18510.2 |
1477!+1 | 1481 | 13426.3 |
1706595*2^11235+1 | 13 | 11255.7 |
2897*2^9715+1 | 3 | 9726.5 |
872!+1 | 983 | 7266.0 |
6611*2^6611+1 | 3 | 6623.7 |
4713*2^4713+1 | 5 | 4725.2 |
427!+1 | 467 | 3120.8 |
399!+1 | 409 | 2877.4 |
340!+1 | 347 | 2374.2 |
2^2281-1 | 3 | 2281 |
320!+1 | 367 | 2206.8 |
2^1279-1 | 5 | 1279 |
154!+1 | 163 | 901.9 |
2^607-1 | 5 | 607 |
Many of the entries are Cullen primes. The 211235 entry was mentioned earlier, also see the post about Mersenne Primes. It appears that the minimum primitive root of X factorial plus 1 is always greater than X.
The C18496 entry took 2.72 days on an Athlon 700, with
Pari/GP 2.1.3, most of the time which was spent on proving
its primality, even though I already knew it was prime.
Later I learned about that one can essentially assert primality of P for znprimroot
with addprimes(P)
.
The 29715 entry came from the Sierpinski problem.
The factorial primes 427 and greater used the following gp code, which relies on the conjecture that the least primitive root is greater than n, and is prime.
m=n!; forprime(root=n, n+10000, print("root=",root); fl=0; forprime(p=2,n, if((Mod(root,m+1)^(m/p)==Mod(1,m+1)),
print(" unhappy at ", p); fl=1; break)); if(fl==0,break))
Saturday, December 18, 2004
Period
The period ``.'' serves four purposes in English: a sentence terminator, an abbreviation mark (``Mr.'') , a decimal point (``3.14''), and one-third of ellipses (``...''). First here's a silly quiz. Complete the sentence with the appropriate punctuation:
The clock read 4:20 p.m., 4:21 p.m., 4:22 p.m
- ...
- ....
- .....
This multipurpose use makes automated parsing nontrivial. However, in LaTeX, one can introduce a macro, \newcommand{\STOP}{.}
that will take us back to the telegraph days\STOP It's still a little tricky to end a sentence with an abbreviation, however, perhaps even that can be fixed by something that detects whether the last character was a period\STOP LaTeX already has \ldots for ellipses\STOP
The clock read 4:20 p\abbreviationperiod m\abbreviationperiod, 4:21 p\abbreviationperiod m\abbreviationperiod, 4:22 p\abbreviationperiod m\abbreviationperiod\ldots\STOP
Rubik's Attack
Let ENC and DEC be cipher encryption and decryption steps, not necessarily respectively. Consider the operation
c=ENC(k,p) c'=c XOR mask p'=DEC(k,c')
or the operation
c=ENC(k,p) k'=k XOR mask p'=DEC(k',c)
where c
, p
, c'
, p'
,
and mask
are all known. Can k
be
recovered with enough examples?
This is named after many Rubik's cube operations are of the form AXA-1; that is, first do a preparation, then do something, then undo the preparation.
Wednesday, December 15, 2004
Sequence A016027
The values of N such that the N-th prime number is a Mersenne prime exponent. Probably the most compressed representation of thousands of years of computation of Mersenne primes.
Update (2011): The first differences A135701 are slightly more compressed: 1 1 1 2 1 1 3 7 6 4 3 67 13 96 121 11 116 128 19 594 30 131 897 181 156 2033 3760 2105 1842 6961 41453 7556 28716 9974 108217 3031 256669 402707 452111 179537? 113178? 258898? 126198? 263183? 313608? 26616?
19 594 30 are the 4253 4423 9689 9941 gaps.
Mass-Energy equivalence
% units 2084 units, 71 prefixes, 32 nonlinear units You have: g c^2 You want: kiloton tnt * 21.480764 / 0.046553278 You have: gigaton tnt You want: lb c^2 * 102.63241 / 0.0097435108
So, one gram is equivalent to 21 kiloton TNT (about the Nagasaki atomic bomb), and small 100 pound person is a 1000 megaton nuclear weapon, far larger than has ever been constructed.
Tuesday, December 14, 2004
Primitive root of an 11,000-bit prime
znprimroot
using Pari/GP. The
prime is one of a twin-prime
pair discovered in 1989.
Saturday, December 11, 2004
Verhoeff PIDs
Wednesday, December 08, 2004
Speex and gz
Monday, December 06, 2004
Interesting bitstrings
00001
00010
00100
01000
10000
11110
11101
11011
10111
01111
00001
00011
00111
01111
11111
11110
11100
11000
10000
00000
So it looks like about 4*n for n bits. So approximately 512 for 128-bit (AES). The related-key related-ciphertext related-plaintext challenge will have 2*512*512=500,000 lines. (The factor of 2 for encrypt/decrypt).
Binary strings