aarjaneiro/planetmath huggingface dataset:
bitwise XOR

bitwise XOR

Bitwise XOR

or

bitwise

exclusive OR

is a bit-level

operation

on two binary values which indicates which bits are set in only one value. For each position

i

, if the bit

d

i

in one value is 1 and the other is 0, then

d

i

of the result is 1, otherwise it’s 0. If both input

d

i

are 1, the output

d

i

is 0. then For example, given 50 and 163 in two unsigned bytes, a bitwise XOR returns 145.

0

0

1

1

0

0

1

0

XOR

1

0

1

0

0

0

1

1

=

1

0

0

1

0

0

0

1

Given a

Mersenne number

of the form

2

k

-

1

(where

k

is the bit size of the data type in use, e.g., 8 for bytes, 16 for words, 32 for double words, etc.) and some smaller

integer

n

, XORing that Mersenne number with

n

has the same effect as performing a

bitwise NOT

on

n

. Or, given

m

and

n

, XORing them has the same effect as

m

-

n

(subject to some caveats about the sign bit, or if the values are unsigned, the effect is then the same as

|

m

-

n

|

). XORing two values that are the same gives 0.

Title

bitwise XOR

Canonical name

BitwiseXOR

Date of creation

2013-03-22 17:02:52

Last modified on

2013-03-22 17:02:52

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Related topic

BitwiseAND

Related topic

BitwiseOR

Related topic

BitwiseNOT

Generated on Fri Feb 9 15:21:54 2018 by

LaTeXML
Champernowne’s constant

Champernowne’s constant

For a given base

b

,

Champernowne’s constant

C

b

is the result of concatenating the base

b

digits of the

positive integers

in order after 0 and a

decimal point

, that is,

∑

i

=

1

∞

i

b

∑

j

=

1

i

k

(where

k

is the number of digits of

j

in base

b

).

Kurt Mahler proved that

C

10

(approximately 0.123456789101112131415161718192021…) is a

transcendental number

. Champernowne had earlier proved that

C

10

is a

normal number

.

Title

Champernowne’s constant

Canonical

name

ChampernownesConstant

Date of creation

2013-03-22 17:04:09

Last modified on

2013-03-22 17:04:09

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Synonym

Champernowne constant

Generated on Fri Feb 9 15:21:56 2018 by

LaTeXML
Conway’s constant

Conway’s constant

Conway’s constant

λ

≈

1.303577296

gives the

asymptotic

rate of growth in the length between

a

i

and

a

i

+

1

in most look and say sequences. That is, given a function

d

⁢

(

n

)

that gives us the number of digits of

n

in base 10, then

lim

i

→

∞

⁡

a

i

+

1

a

i

=

λ

.

For example, starting with

n

=

1

and skipping ahead to

a

7

, we observe

i

a

i

a

i

+

1

a

i

7

13112221

1.333333333…

8

1113213211

1.25

9

31131211131221

1.4

10

13211311123113112211

1.428571428…

11

11131221133112132113212221

1.3

12

3113112221232112111312211312113211

1.307692307…

Conway’s constant is the largest zero of this degree 71

polynomial

:

x

71

-

x

69

-

2

⁢

x

68

-

x

67

+

2

⁢

x

66

+

2

⁢

x

65

+

x

64

-

x

63

-

x

62

-

x

61

-

x

60

-

x

59

+

2

⁢

x

58

+

5

⁢

x

57

+

3

⁢

x

56

-

2

⁢

x

55

-

10

⁢

x

54

-

3

⁢

x

53

-

2

⁢

x

52

+

6

⁢

x

51

+

6

⁢

x

50

+

x

49

+

9

⁢

x

48

-

3

⁢

x

47

-

7

⁢

x

46

-

8

⁢

x

45

-

8

⁢

x

44

+

10

⁢

x

43

+

6

⁢

x

42

+

8

⁢

x

41

-

5

⁢

x

40

-

12

⁢

x

39

+

7

⁢

x

38

-

7

⁢

x

37

+

7

⁢

x

36

+

x

35

-

3

⁢

x

34

+

10

⁢

x

33

+

x

32

-

6

⁢

x

31

-

2

⁢

x

30

-

10

⁢

x

29

-

3

⁢

x

28

+

2

⁢

x

27

+

9

⁢

x

26

-

3

⁢

x

25

+

14

⁢

x

24

-

8

⁢

x

23

-

7

⁢

x

21

+

9

⁢

x

20

+

3

⁢

x

19

-

4

⁢

x

18

-

10

⁢

x

17

-

7

⁢

x

16

+

12

⁢

x

15

+

7

⁢

x

14

+

2

⁢

x

13

-

12

⁢

x

12

-

4

⁢

x

11

-

2

⁢

x

10

+

5

⁢

x

9

+

x

7

-

7

⁢

x

6

+

7

⁢

x

5

-

4

⁢

x

4

+

12

⁢

x

3

-

6

⁢

x

2

+

3

⁢

x

-

6

References

1

Steven R. Finch,

Mathematical Constants

. Cambridge: Cambridge University Press (2003): 453

Title

Conway’s constant

Canonical name

ConwaysConstant

Date of creation

2013-03-22 18:02:36

Last modified on

2013-03-22 18:02:36

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Generated on Fri Feb 9 15:21:58 2018 by

LaTeXML
Copeland-Erdős constant

Copeland-Erdős constant

The

Copeland-Erdős constant

is the

concatenation

of “0.” with the base 10

representations

of the

prime numbers

in order. Its value is approximately 0.235711131719232931374143… listed in A033308 of Sloane’s OEIS.

The larger

Smarandache-wellin numbers

approximate the value of this constant multiplied by the appropriate power of 10.

Its

continued fraction

is

0

+

1

4

+

1

4

+

1

8

+

⋯

and is listed in A030168 of the OEIS.

In base 10, this is a

normal number

, a fact proven by A.H. Copeland and Paul Erdős in 1946 (hence the name of the constant).

Title

Copeland-Erdős constant

Canonical name

CopelandErdHosConstant

Date of creation

2013-03-22 15:55:06

Last modified on

2013-03-22 15:55:06

Owner

Mravinci (12996)

Last modified by

Mravinci (12996)

Numerical id

10

Author

Mravinci (12996)

Entry type

Definition

Classification

msc 11A63

Synonym

Copeland-Erdos constant

Synonym

Copeland-Erdös constant

Synonym

Copeland Erdos constant

Synonym

Copeland Erdös constant

Generated on Fri Feb 9 15:21:59 2018 by

LaTeXML
corollary of Kummer’s theorem

corollary of Kummer’s theorem

As shown in Kummer’s

theorem

, the power of a

prime number

p

dividing

(

n

m

)

,

n

≥

m

∈

ℕ

, was the total number of carries when
adding

m

and

n

-

m

in base

p

. We’ll give a

recurrence relation

for the carry
indicator.

Given

integers

n

≥

m

≥

0

and a prime number

p

, let

n

i

,

m

i

,

r

i

be
the

i

-th digit of

n

,

m

, and

r

:=

n

-

m

, respectively.

Define

c

-

1

=

0

, and

c

i

=

{

1

if

m

i

+

r

i

≥

p

,

0

otherwise

for each

i

≥

0

up to the number of digits of

n

.

For each

i

≥

0

we have

n

i

=

m

i

+

r

i

+

c

i

-

1

-

p

.

c

i

.

Starting with the

i

-th digit of

n

, we multiply with increasing powers of

p

to get

∑

k

=

i

d

n

k

⁢

p

k

-

i

=

(

∑

k

=

i

d

p

k

-

i

⁢

(

m

k

+

r

k

)

)

+

∑

k

=

i

d

(

p

k

-

1

-

(

i

-

1

)

⁢

c

k

-

1

-

p

k

-

(

i

-

1

)

⁢

c

k

)

.

The last sum in the above equation leaves only the values for indices

i

and

d

, and we get

⌊

n

p

i

⌋

=

⌊

m

p

i

⌋

+

⌊

r

p

i

⌋

+

c

i

-

1

(1)

for all

i

≥

0

.

Title

corollary of Kummer’s theorem

Canonical name

CorollaryOfKummersTheorem

Date of creation

2013-03-22 13:23:07

Last modified on

2013-03-22 13:23:07

Owner

Thomas Heye (1234)

Last modified by

Thomas Heye (1234)

Numerical id

7

Author

Thomas Heye (1234)

Entry type

Corollary

Classification

msc 11A63

Generated on Fri Feb 9 15:22:02 2018 by

LaTeXML
Demlo number

Demlo number

Given base

b

, a number of the form

(

b

n

-

1

b

-

1

)

2

for

n

>

0

(that is, the square of a

repunit

) is a

Demlo number

, sometimes called a

wonderful Demlo number

.

The Demlo numbers for

n

<

b

are also

palindromic numbers

, and specifically of the form

n

⁢

b

n

-

1

+

∑

i

=

1

n

-

1

(

i

⁢

b

2

⁢

n

-

i

+

i

⁢

b

i

-

1

)

,

that is, the most

significant digits

are the first

n

digits of base

b

in order and the least significant digits are the first

n

digits of base

b

backwards.

Title

Demlo number

Canonical name

DemloNumber

Date of creation

2013-03-22 16:22:01

Last modified on

2013-03-22 16:22:01

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Synonym

wonderful Demlo number

Generated on Fri Feb 9 15:22:03 2018 by

LaTeXML
digit sum

digit sum

Given an

integer

m

consisting of

k

digits

d

1

,

…

,

d

k

in base

b

, let

j

=

∑

i

=

1

k

d

i

,

then

j

is the

digit sum

of

m

. Iterating this operation on the digits of

j

until

j

<

b

gives the

digital root

or repeated digit sum of

m

. The digit sum and digital root of a number are the same only if the additive persistence of the digital root is 1.

Title

digit sum

Canonical name

DigitSum

Date of creation

2013-03-22 16:22:53

Last modified on

2013-03-22 16:22:53

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Generated on Fri Feb 9 15:22:05 2018 by

LaTeXML
digitaddition generator

digitaddition generator

Given an

integer

m

consisting of

k

digits

d

x

in base

b

, it follows that

m

+

∑

i

=

0

k

-

1

d

i

+

1

⁢

b

i

=

n

, another integer. Then

m

is said to be the

digitaddition generator

of

n

.

In a randomly chosen range of

2

⁢

b

consecutive integers, most will have a digitaddition generator and one or two might have none (such integers are called self numbers). If the range falls near a

multiple

of

b

2

, it might contain a few numbers with two digitaddition generators. If the range includes

0

<

n

<

b

and

2

|

b

, the

n

|̸

2

will lack digitaddition generators.

Title

digitaddition generator

Canonical

name

DigitadditionGenerator

Date of creation

2013-03-22 15:56:12

Last modified on

2013-03-22 15:56:12

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Synonym

digit addition generator

Synonym

digit-addition generator

Generated on Fri Feb 9 15:22:07 2018 by

LaTeXML
digital root

digital root

Given an

integer

m

consisting of

k

digits

d

1

,

…

,

d

k

in base

b

, let

j

=

∑

i

=

1

k

d

i

,

then repeat this

operation

on the digits of

j

until

j

<

b

. This stores in

j

the

digital root

of

m

. The number of iterations of the sum operation is called the

additive persistence

of

m

.

The digital root of

b

x

is always 1 for any natural

x

, while the digital root of

y

⁢

b

n

(where

y

is another

natural number

) is the same as the digital root of

y

. This should not be taken to imply that the digital root is necessarily a

multiplicative function

.

The digital root of an integer of the form

n

⁢

(

b

-

1

)

is always

b

-

1

.

Another way to calculate the digital root for

m

>

b

is with the

formula

m

-

(

b

-

1

)

⁢

⌊

m

-

1

b

-

1

⌋

.

Title

digital root

Canonical name

DigitalRoot

Date of creation

2013-03-22 15:59:34

Last modified on

2013-03-22 15:59:34

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

13

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Synonym

repeated digit sum

Synonym

repeated digital sum

Defines

additive persistence

Generated on Fri Feb 9 15:22:09 2018 by

LaTeXML
dihedral prime

dihedral prime

A

dihedral prime

or

dihedral calculator prime

is a

prime number

that still reads like itself or another prime number when read in a

seven-segment display

, regardless of

orientation

(normally or upside down), and surface (actual display or

reflection

on a mirror). The first few base 10 dihedral primes are 2, 11, 101, 181, 1181, 1811, 18181, 108881, 110881, 118081, 120121, 121021, 121151, 150151, 151051, 151121, 180181, 180811, 181081, etc. These are listed in A038136 of Sloane’s OEIS.

The smallest dihedral prime that reads differently with each orientation and surface

combination

is 120121.

The digits 0, 1 and 8 remain the same regardless of orientation or surface. 2 and 5 turn into each other when viewed upside down or reflected on a mirror. In the display of a

scientific calculator

that can handle

hexadecimal

, 3 would become E reflected, but E being an even digit, the 3 can’t be used as the first digit because the reflected number will be even.
Though 6 and 9 become each other upside down, they are not valid digits when reflected, at least not in any of the

numeral systems

pocket

calculators

usually operate in. In binary, all

palindromic primes

are dihedral.

Strobogrammatic primes

that don’t use 6 or 9 are dihedral primes.

Title

dihedral prime

Canonical

name

DihedralPrime

Date of creation

2013-03-22 16:46:53

Last modified on

2013-03-22 16:46:53

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Synonym

dihedral calculator prime

Generated on Fri Feb 9 15:22:11 2018 by

LaTeXML
divisibility of nine-numbers

divisibility of nine-numbers

We know that 9 is

divisible

by the

prime number

3 and that 99 by another prime number 11.  If we study the

divisibility

other “nine-numbers” by primes, we can see that 999 is divisible by a greater prime number 37 and 9999 by 101 which also is a prime, and so on.  Such observations may be generalised to the following

Proposition

.

For every

positive

odd prime

p

except 5, there is a nine-number

999

⁢

…

⁢

9

divisible by

p

.

Proof.

Let

p

be a positive odd prime

≠

5

.  Let’s form the set of the

integers

9

,

99

,

999

,

…

,

99

⁢

…

⁢

9

⏟

p

⁢

nines

.

(1)

We make the antithesis that no one of these numbers is divisible by

p

.  Therefore, their least nonnegative

remainders

modulo

p

are some of the

p

-

1

numbers

1

,

2

,

3

,

…

,

p

-

1

.

(2)

Thus there are at least two of the numbers (1), say

a

and

b

(

a

<

b

), having the same remainder.  The

difference

b

-

a

then has the

decadic

of the form

b

-

a

=

999

⁢

…

⁢

9000

⁢

…

⁢

0

,

which comprises at least one 9 and one 0.  Because of the equal remainders of

a

and

b

, the difference is divisible by

p

.  Since

b

-

a

=

999

⁢

…

⁢

9

⋅

1000

⁢

…

⁢

0

and 2 and 5 are the only

prime factors

of the latter factor (

http://planetmath.org/Product

),

p

must divide the former factor

999

⁢

…

⁢

9

(cf.

divisibility by prime

).  But this is one of the numbers (1), whence our antithesis is wrong.  Consequently, at least one of (1) is divisible by

p

.

In other

http://planetmath.org/node/3313

positional digital systems, one can write propositions analogous to the above one concerning the decadic system, for example in the dyadic (a.k.a. digital system:

Proposition.

For every odd prime

p

, there is a number

111

⁢

…

⁢

1

two

divisible by

p

.

Title

divisibility of nine-numbers

Canonical

name

DivisibilityOfNinenumbers

Date of creation

2013-03-22 19:04:43

Last modified on

2013-03-22 19:04:43

Owner

pahio (2872)

Last modified by

pahio (2872)

Numerical id

8

Author

pahio (2872)

Entry type

Theorem

Classification

msc 11A63

Classification

msc 11A05

Generated on Fri Feb 9 15:22:12 2018 by

LaTeXML
divisibility test

divisibility test

A means of determining whether

m

|

n

without actually having to calculate

n

m

. Most

divisibility tests

exploit some

characteristic

of the

multiples

of

m

in a given base

b

.

For example, suppose that for some reason you wanted to determine whether 24709898213 is

divisible

by 11 but didn’t have access to (or didn’t want to use) a

calculator

or

computer

. You don’t need to know the result or the

remainder

(if applicable).

The most

obvious

way to make the determination is by actually dividing 24709898213 by 11. This could take ten

subtractions

and at least six multiplication table look-ups (even if one has memorized the multiplication table, it still counts as an

operation

). The answer is 2246354383 and there is no remainder, meaning that 24709898213 is in fact divisible by 11.

If on the other hand you add up the odd place digits (2 + 7 + 9 + 9 + 2 + 3) and subtract the sum of the even place digits (4 + 0 + 8 + 8 + 1), you get the answer 11, meaning that 24709898213 is in fact divisible by 11; this result was obtained having needed just two

additions

and one subtraction. This is the well-known base 10 divisibility test by 11, which is that an

integer

n

is divisible by 11 if the

difference

between the sum of the odd-placed digits and the even-placed digits is also a multiple of 11.

A few other well-known divisibility tests in base 10 are:

n

is divisible by 2 if the least

significant digit

is 0, 2, 4, 6 or 8.

n

is divisible by 3 if it has

digital root

3, 6 or 9.

n

is divisible by 5 if the least significant digit is 0 or 5.

n

is divisible by 9 if it has digital root 9.

n

is divisible by 10 if the least significant digit is 0.

From this it can be generalized to other bases: that if

2

|

b

then the least significant digit of the number has to be even for the number as a whole to also be even; that if the digital root of

n

is

b

-

1

then

(

b

-

1

)

|

n

; that

b

x

|

n

if the

x

least significant digits of

n

are all zeroes; and that

(

b

+

1

)

|

n

if the difference of the odd placed digits and the even place digits of

n

is a multiple of

b

+

1

.

For some

semiprimes

p

⁢

q

it might still be advantageous to perform two divisibility tests (one for

p

and then one for

q

) than to calculate

n

p

⁢

q

.

Divisibility tests are usually more useful for humans than for computers, and then only for sufficiently small numbers. For example, a computer might be able to divide 10000! + 11 by 11 in an immediate-feeling .032 seconds, but it might take .094 seconds just to figure out what the base 10 digits of 10000! + 11 are. However, the divisibility tests in binary might be useful for certain programming problems.

Title

divisibility test

Canonical

name

DivisibilityTest

Date of creation

2013-03-22 15:59:58

Last modified on

2013-03-22 15:59:58

Owner

CompositeFan (12809)

Last modified by

CompositeFan (12809)

Numerical id

6

Author

CompositeFan (12809)

Entry type

Definition

Classification

msc 11A63

Synonym

divisibility rule

Generated on Fri Feb 9 15:22:15 2018 by

LaTeXML
doubly even number

doubly even number

A

doubly even number

is an

even number

divisible

by 4 and sometimes greater

powers of two

. If

n

is a doubly even number, it satisfies the

congruence

n

≡

0

mod

4

. The first few

positive

doubly even numbers are 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, listed in A008586 of Sloane’s OEIS.

In the binary representation of a positive doubly even number, the two least significant bits are always both 0. Thus it takes at least a 2-bit right shift to change the parity of a doubly even number to odd. These properties obviously also hold true when representing negative numbers in binary by prefixing the

absolute value

with a minus sign. As it turns out, all this also holds true in two’s complement. Independently of binary representation, we can say that the

p

-adic

valuation

(

http://planetmath.org/PAdicValuation

) of a doubly even number

n

with

p

=

2

is always

1

4

or less.

All doubly even numbers are

composite

. In representing a doubly even number

n

as

∏

i

=

1

π

⁢

(

n

)

p

i

a

i

,

with

p

i

being the

i

th

prime number

,

a

1

>

1

, all other other

a

i

may have any

nonnegative integer

value.

If

n

is doubly even, then the value of

τ

⁢

(

n

)

(the

divisor function

) is even except when all the nonzero

a

i

in the factorization are greater than 1.

Whereas

(

-

1

)

n

=

1

whether

n

is singly or doubly even, with the

imaginary unit

i

it is the case that

i

n

=

1

only when

n

is doubly even.

Title

doubly even number

Canonical name

DoublyEvenNumber

Date of creation

2013-03-22 18:09:38

Last modified on

2013-03-22 18:09:38

Owner

1and2and4 (20899)

Last modified by

1and2and4 (20899)

Numerical id

5

Author

1and2and4 (20899)

Entry type

Definition

Classification

msc 11A63

Classification

msc 11A51

Related topic

SinglyEvenNumber

Related topic

FactorsWithMinusSign

Generated on Fri Feb 9 15:22:16 2018 by

LaTeXML
duodecimal

duodecimal

The

duodecimal

system

is a

positional number system

with base 12, using the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A and B.

The duodecimal comes fro Latin.  There is also a less used synonym

duodecadic

mixed of a Latin begin and a Greek end and still a purely Greek

dodecadic

.

Some

divisibility tests

in duodecimal are:

n

is

divisible

by 2 if its least

significant digit

is 0, 2, 4, 6, 8 or A.

n

is divisible by 3 if its least significant digit is 0, 3, 6 or 9.

n

is divisible by 4 if its least significant digit is 0, 4 or 8.

n

is divisible by 6 if its least significant digit is 0 or 6.

n

is divisible by 11 if it has

digital root

B.

n

is of course divisible by 12 if it ends in a 0.

n

is divisible by 13 if the

difference

of the odd placed digits and the even place digits of

n

is a

multiple

of 13.

Title

duodecimal

Canonical

name

Duodecimal

Date of creation

2013-03-22 16:20:55

Last modified on

2013-03-22 16:20:55

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

5

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Generated on Fri Feb 9 15:22:18 2018 by

LaTeXML
equidigital number

equidigital number

An

equidigital number

n

is an

integer

with a base

b

representation

of

k

digits for which the

prime factorization

uses exactly

k

digits (with repeated

prime factors

grouped with

exponents

and the digits of those exponents counted whenever greater than 1). Regardless of the base, all primes are equidigital. The first few

composite

equidigital numbers in base 10 are 10, 14, 15, 16, 21, 25, 27, 32, 35, 49, 64, 81, 105, 106, 111, 112, 115, 118, 119, 121, 122, 123, 129, 133, 134, 135, etc.

References

1

D. Darling, “

Economical number

” in

The Universal Book of Mathematics: From Abracadabra To Zeno’s paradoxes

. Hoboken, New Jersey: Wiley (2004)

2

B. R. Santos, “Problem 2204. Equidigital Representation.”

J. Recr. Math.

27

(1995): 58 - 59.

Title

equidigital number

Canonical name

EquidigitalNumber

Date of creation

2013-03-22 16:41:17

Last modified on

2013-03-22 16:41:17

Owner

PrimeFan (13766)

Last modified by

PrimeFan (13766)

Numerical id

4

Author

PrimeFan (13766)

Entry type

Definition

Classification

msc 11A63

Related topic

FrugalNumber

Related topic

ExtravagantNumber

Generated on Fri Feb 9 15:22:19 2018 by

LaTeXML