Thursday, December 30, 2004

Platykurtosis

Is there a canonical heavy-tailed distribution? Perhaps Student's t? -- Mobile Email from a Cingular Wireless Customer http://www.cingular.com

Circle, ellipse, ...

A circle is a loop with 1 DOF: radius. Ellipse has 2 DOF. What is a closed curve with 3 DOF? I'm thinking oval-like. -- Mobile Email from a Cingular Wireless Customer http://www.cingular.com

Monday, December 20, 2004

Primitive Roots of Selected Large Primes

PrimeMinimum GeneratorApprox log2
59656*2^59656+1359671.9
32292*2^32292+1532307.0
18496*2^18496+1318510.2
1477!+1148113426.3
1706595*2^11235+11311255.7
2897*2^9715+139726.5
872!+19837266.0
6611*2^6611+136623.7
4713*2^4713+154725.2
427!+14673120.8
399!+14092877.4
340!+13472374.2
2^2281-132281
320!+13672206.8
2^1279-151279
154!+1163901.9
2^607-15607

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

13 is the least primitive root of 1706595*211235+1, as reported by a 5-hour computation of znprimroot using Pari/GP. The prime is one of a twin-prime pair discovered in 1989.

Saturday, December 11, 2004

Verhoeff PIDs

Let process ID numbers always have a check digit appended to them so you don't accidentally typo and kill -9 the wrong process. -- Mobile Email from a Cingular Wireless Customer http://www.cingular.com

Wednesday, December 08, 2004

Speex and gz

Does Speex have a lossless compression step, eg RLE, that can be skipped in favor of an off-the-shelf gz or bz2? -- Mobile Email from a Cingular Wireless Customer http://www.cingular.com

Monday, December 06, 2004

Interesting bitstrings

Here's the 5-bit version:

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

Saturday, December 04, 2004

barbital + shanties = throbbed

Encrypting the plaintext ``barbital'' with the key ``shanties'' using the simple cipher a=(leave char unchanged) b=(forward one letter in the alphabet) b=(forward two letters)... yields the ciphertext ``throbbed'' which is the longest (and unique instance of length 8) in Linux's /usr/share/dict/words in which all three are English words. It also works swapping the plaintext and key.

Thursday, December 02, 2004

Aspect 2

Given integer X, find integers m and n s.t. mn>X, 2m>=n>=m, minimizing mn-X. -- Mobile Email from a Cingular Wireless Customer http://www.cingular.com