Numbers

Continuing the porting of stuff from betaveros.stash, and adding more stuff.

Mnemonic

Here's my mnemonic table for digits, inspired by an old Martin Gardner column. I wrote from memory the first 132 digits of 2012! correctly at IMO 2012 with this table. I had remembered more, but unfortunately, if I recall correctly, I confused myself over whether I had encoded a 5 or a 2 by the S of "nose", because this is supposed to be more of a phonetic code than a spelling one — otherwise double letters would be confusing and lots of randomly appearing digraphs would be wasted, because English is weird.

Although most of the associations are completely changed, the set of unused consonants is the same. They spell WHY.

digitconsonant(s)mnemonic
1Ll33t
2Z(, J, CH, TH)l33t
3Mtilt head sideways
4F(, V)Four
5S(, SH)l33t
6G(, K)l33t
7T(, D)l33t
8B(, P)l33t
9NNine
0RzeRo, or it's a Round circle

Bits & Primes

2095133040 has 1600 factors, the most of any positive integer under 231 − 1. Ref: A002182: highly composite numbers, def. 1

There are 105097565 (1.05e8) primes under 231 − 1.

Miller-Rabin primality testing does not miss any composites:

See A014233.

To verify implementations: there are 82025 primes beneath (1 << 20) and 37871 primes between (1 << 40) and (1 << 40) + (1 << 20).

Primes in Decimal

  • 1881881
    • n − 1 factorization: 23 × 5 × 7 × 11 × 13 × 47
    • smallest primitive root: 6
  • 99990001
    • n − 1 factorization: 24 × 32 × 54 × 11 × 101
    • smallest primitive root: 13
  • 140000041
    • n − 1 factorization: 23 × 32 × 5 × 157 × 2477
    • smallest primitive root: 28
  • 987654323
    • n − 1 factorization: 2 × 701 × 704461
    • smallest primitive root: 2
  • 999299999
    • n − 1 factorization: 2 × 23 × 21723913
    • smallest primitive root: 11
  • 999992999
    • n − 1 factorization: 2 × 499996499
    • smallest primitive root: 11
  • 999999001
    • n − 1 factorization: 23 × 33 × 53 × 7 × 11 × 13 × 37
    • smallest primitive root: 17
  • 999999929
    • n − 1 factorization: 23 × 124999991
    • smallest primitive root: 3
  • 1000000007
    • n − 1 factorization: 2 × 500000003
    • smallest primitive root: 5
  • 1000000009
    • n − 1 factorization: 23 × 32 × 7 × 1092 × 167
    • smallest primitive root: 13
  • 1000000021
    • n − 1 factorization: 22 × 3 × 5 × 19 × 739 × 1187
    • smallest primitive root: 2
  • 1234567891
    • n − 1 factorization: 2 × 32 × 5 × 3607 × 3803
    • smallest primitive root: 3
  • 2000000011
    • n − 1 factorization: 2 × 3 × 5 × 66666667
    • smallest primitive root: 2

Primes in Hexadecimal

  • 0xdefaced
    • n − 1 factorization: 22 × 32 × 5 × 1298951
    • smallest primitive root: 6
  • 0xfacade5
    • n − 1 factorization: 22 × 3 × 21914579
    • smallest primitive root: 6
  • 0x37beefed
    • n − 1 factorization: 22 × 3 × 5 × 1373 × 11353
    • smallest primitive root: 6
  • 0x3c0ffee1
    • n − 1 factorization: 25 × 7 × 2113 × 2129
    • smallest primitive root: 3
  • 0x3de1f1ed
    • n − 1 factorization: 22 × 11 × 23595857
    • smallest primitive root: 3
  • 0x3efface5
    • n − 1 factorization: 22 × 32 × 37 × 47 × 16883
    • smallest primitive root: 2
  • 0x5eedbed5
    • n − 1 factorization: 22 × 7 × 53 × 199 × 5393
    • smallest primitive root: 10

Floating Point

Special cases: