This page is the CCCC Index Page.
If you prefer to see only the titles of the programs present on this site (without description), click Contents.
Programs for free download
Decimal-to-binary converter of formal Collatz sequence
Shortcut Collatz sequence
Reduced Collatz sequence
Tables of reduced Collatz sequences of the first 50 natural odds
Ordered list of formal and reduced Collatz trajectories
Backward iteration
Collatz tree
A simple tree structure of Collatz sequences
Collatz branching density
Some relations of positive odds, Collatz divisors and first Collatz iterates
Number of iterations
Collatz classes
Sequence of least odds of Collatz classes
Composite Collatz classes
Composite Collatz classes (continued)
Arithmetic sequences and Collatz divisors
Repetitive subsequences in Collatz divisor sequences
Related sequences
Sequence analysis
Factorization of reduced Collatz iterates
Partially generalized Collatz sequences
Collatz divisors 2 and 4
Domain of Collatz sequence extended to all odds
Reduced Collatz sequences having a common final part
Search for cycles in Collatz-like sequences
Cycle calculation from cycle-formula of Collatz-like sequences
Backward iteration of Collatz-like functions
Continued backward iteration of Collatz-like functions
Divisors in Collatz-like sequences
Collatz-like sequences with one trivial cycle
Collatz-like sequences with one of two possible trivial cycles
Collatz-like sequence type with trivial and non-trivial cycles
Collatz-like sequences of Gaussian integers
Juggler sequence
Collatz sequence and probability
Collatz sequence and adjustable probability
Relative frequency of Collatz divisors
Expected growth of successive Collatz odds
Computational properties of Collatz sequences
Collatz sequences of positive odd multiples of 3 having equal Length or equal Tau
Odd multiples of 3: Distribution of Collatz sequence properties Length and Tau
The fitting of Collatz sequences
Variables of the equation of reduced Collatz sequences
Constrained combinatorial compositions and Collatz sequences
Constrained compositions of Collatz divisor exponents
Free downloads
All programs on this site are JavaScripts (1.5). They have only been tested in Internet Explorer 6 and 7. They are described
below, where you can see them work. Some of them (with *) you can freely download, provided you accept the conditions for use as formulated on the Download page.
Click the link above to reach this page. You can select on this page the programs you are interested in.
Programs Collatz problem
Formal Collatz sequence
The program Formal Collatz sequence* gives the results of applying the Collatz procedure repeatedly (iteration).
Example: 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. Starting with 9, the sequence
reaches 1 after 19 iterations. Some other programs on this site are based on the reduced Collatz sequence model (see Reduced Collatz sequence).
The program Decimal-to-binary converter of formal Collatz sequence calculates formal Collatz sequences of positive integers (12 digits at most, decimal representation) and converts them to binary numbers.
This program iterates the shortcut form of the Collatz function: T(n) = {(3n + 1)/2 (if n is odd), n/2 (if n is even) | n ∈ N+}. Example: 9, 14, 7, 11, 17, 26, 13, 20, 10, 5, 8, 4, 2, 1.
The program Reduced Collatz sequence* shows only the odd integers of a formal Collatz sequence. Between successive odd integers the Collatz divisor
is shown (between parentheses). The Collatz divisor equals 2 ^ k, in which k is the number of times that was divided by 2. Example: 9 (4) 7 (2) 11 (2) 17 (4) 13 (8) 5 (16) 1. Starting with 9, the sequence reaches 1 after 6 iterations. An iteration takes an odd integer to the next odd integer of the sequence (by definition).
The number 27 has a relatively long Collatz sequence. This sequence and some selected branches of it contain all the odds of the first 50 reduced Collatz sequences, as illustrated in 2 Tables.
This program calculates the formal Collatz sequences (trajectories, orbits) of the first 500 consecutive positive integers or the reduced Collatz sequences of the first 500 consecutive positive odd integers. When the sequence calculation arrives at an integer occurring in a preceding sequence, it halts and points to the start value of that sequence.
Backward iteration is possible for any odd positive integer, except multiples of 3. There are infinitely many ways of iterating backward.
The program selects the path with the Collatz divisors 2 and 4 only. All reverse iterations end with a multiple of 3. The output of the program is the reduced Collatz sequence in the normal order (ending with the integer you entered). Often the sequences are very short (even for relatively high integers). However, there exist also longer sequences: try 620527837 or 106646868445.
In the program Collatz tree* you enter any odd integer and the number of iterations to reach this integer. The program shows one of numerous reduced Collatz branches which meet this requirement.
The tree structure of Collatz sequences is based on only two simple rules, as explained in our comment to the program A simple tree structure of Collatz sequences.
This program enables you to calculate all Collatz sequences of a preselected sequence length (and ending at 1). Only for keeping the calculation time acceptably,
an upper bound is selected. You can verify the presence of all sequences, using the above program Reduced Collatz sequence.
The program Collatz branching density calculates the branching density of each odd of any reduced Collatz sequence. The domain of predecessors is derived from an adjustable interval of consecutive odds. The branching densities are shown in a diagram. A table enumerates all predecessor odds of the branching points.
The program Collatz equation calculates the equation of any reduced Collatz sequence from its sequence iterates.
In the program Some relations of positive odds, Collatz divisors and first Collatz iterates the Collatz function is defined from odd to odd (called earlier 'reduced' Collatz function). The program enables you to 'verify' experimentally a lot of properties and relations of positive odds, their Collatz divisors and first Collatz iterates, as summarized in a Comment to the program.
To find long reduced Collatz sequences, you can use the program Number of iterations, which iterates all successive odd positive integers batchwise. You select a starting odd and a batch: 20, 50, 200, 500 or 2000 successive odds.
The program Collatz classes calculates the elements of a Collatz class C containing all the odd positive integers having an equal
congruence (modulo 3) of m and an equal Collatz divisor d. Each Collatz class C (m, d) has an infinite number of elements.
The program calculates them (if you wish) until the programmed accuracy limit is exceeded. The program invites you to select m and the exponent k of 2 ^ k.
The output of the program is an enumeration of the elements. In addition the Collatz divisor of each element, its first
iterate and the Collatz divisor of the first iterate are shown.
The program Sequence of least odds of Collatz classes* calculates the sequence of least odds of Collatz classes up to 12 digits for all congruences (mod 3) and Collatz divisors up to 2 ^ 37, ordered by the size of these odds. In addition the sequence can be re-ordered by the size of the Collatz divisors, which makes it easier to see some important subsequences. In a Comment the sequence and its subsequences are discussed.
In the program Composite Collatz classes you can enter m (the congruence (modulo 3) of an element) and several successive Collatz divisors (arbitrarily!). The program enumerates all odd integers (in increasing order) which meet these requirements. In addition each element is iterated. The Collatz
divisor d between two odd integers of a sequence is shown between parentheses. Each sequence ends with the Collatz divisor of the final iterate. The starting point of each sequence is the element of the composite Collatz class C (m, divs). The number of elements of the set is infinite. You can enter the number of elements you want to see.
The above program Composite Collatz classes uses a chain of linear Diophantine equations and the extended Euclidean algorithm. However, the program Composite Collatz classes (continued) does not, as explained in a Comment. It calculates in one run the least positive odd integer of Composite Collatz classes C(m,divs) for m = p mod 3 = 0, 1 or 2 and divs is any combination of elements (Collatz divisors) in {2, 4, 8, 16 , ...}. It gives the formulas for calculation of all the elements of C(m,divs) for m = 0, 1, 2 and their final iterates. It showns how to come from C(0,divs) to C(1,divs) and C(2,divs).
The program calculates up to 1000 terms of one or two arithmetic sequences, starting at 'any' term of the sequence when you input the first term(s). It also calculates the Collatz divisor of each term. The terms and Collatz divisors of both sequences are presented in columns. The program has the possibility to move down or move up the sequence data of one sequence relative to those of the other to compare terms and Collatz divisors. It can be used as a tool to explore relations of odds and their Collatz divisors.
The program Repetitive subsequences in Collatz divisor sequences searches for repeated subsequences in the sequence of Collatz divisors of a reduced Collatz sequence and shows the parts of the Collatz sequence which correspond to such repetitive subsequences. In a Comment to the program the relation between these corresponding parts is explained and some examples of calculation are given.
The program Related sequences searches for c-values within a reduced Collatz sequence. A c-value is a value of the independent variable x which might have terminated
the sequence (to 1) if it had been 0.
There may be several c-values in a sequence. A c-sequence has the same corresponding Collatz-divisors as the main sequence until 1
is reached. The c-values appear in the set formula as constants c. In addition to the main sequence, the program shows (if present) such
subsequences and (if possible to calculate) a related supersequence of which the (old) main sequence is a c-sequence. To find more related sequences (there are infinitely many if there is a c-value), you can use the program Composite Collatz classes.
The program Sequence analysis shows the reduced Collatz sequence of any odd number and its xy-sequence. This xy-sequence (which is an iteration of sets) is analysed.
Any reduced Collatz sequence may be transformed to such an xy-sequence. It is the general case of all odd numbers having the same order of Collatz divisors. The number you entered is one of these numbers.
As seen in the extensive analysis there are many regularities.
In the program Factorization of reduced Collatz iterates* the odd integers (12 digits at most) of any reduced Collatz sequence are factorized. We used this program to find Collatz sequences having only prime iterates (except the final 1). See Some results, which are enclosed to the program.
Some small steps in generalization of the Collatz problem are made in the programs shown on the Collatz generalization page. These programs illustrate the calculation of the number of iterates, Collatz divisors and iterates up to a particular point in a sequence of special sets of reduced Collatz sequences, without applying the common Collatz procedure.
In addition this page presents some auxiliary functions and a program to split up any reduced Collatz sequence into several calculatable parts.
The program Collatz divisors 2 and 4 calculates the terms of Collatz sequences until the Collatz divisor is unequal to 2 and 4. Their are options to select the congruence (mod 3) of the start value, the first Collatz divisor (2 or 4) and the number of sequences.
The results show the iterates and the number of iterations (n) of each sequence (to the above point), the corresponding product of its Collatz divisors and the ratio of the nth iterate and the start value.
The program Domain of Collatz sequence extended to all odds calculates reduced Collatz sequences of positive and negative odds. It recognizes eventual cycles. In a comment to the program the cycles, found so far, are summarized.
If your input is a positive odd, this program calculates all reduced Collatz sequences having the final part of its reduced Collatz sequence in common. In a Comment to the program a typical example is given and the sequences are characterized.
The program Search for cycles in Collatz-like sequences calculates the sequence of the iterative function T(p) = {ap + b (if p is odd) or p/2^x (if p is even)}. Your input is: p (positive or negative odd), the coefficient a (positive odd) and the constant b (positive or negative odd).
There is an option to investigate 500 consecutive odds batchwise. The program finds 'all' eventual cycles and enumerates the odds which fall into these cycles. Some special cases are discussed in a comment accompanying the program.
The program Cycle calculation from cycle-formula of Collatz-like sequences calculates possible cycles (max. cycle length = 6) from the cycle-formula. The cycle-formula is deduced from T(p) = (ap + b) / (2^x). Cycles are defined to go from odd to odd (reduced cycles).
The program iterates backward any odd p ∈ Z when you enter the positive coefficient a ∈ N and the constant b ∈ Z of the Collatz-like function F(p) = (ap + b)/(2^x). Reduced backward iteration (from odd to odd) is not always possible. If iteration is possible, the program always selects the path having the least divisor (shown between parentheses between sequence odds). It also gives p modulo coefficient a if backward iteration of p and all other odds congruent to p (mod a) is impossible, as explained in a Comment to the program.
The program Continued backward iteration of Collatz-like functions: F(p) = (ap + b)/(2^x), calculates a higher divisor when the least divisor making backward iteration possible, leads to a backward-iterate which cannot be iterated backward, thus enabling continued backward iteration in many cases. See the Comment to the program.
The program Divisors in Collatz-like sequences from F(p) = (ap + b)/2x, calculates different odds pi and the corresponding divisors di (= 2xi), having the same odd iterate pi + 1 and gives the iterative function T(p) to calculate these odds and corresponding divisors di = 2xi, in which xi is the number of times that api + b is divided by 2 to reach the odd integer pi + 1. To find odds pi having higher di (and the same pi + 1), use T(p). For lower pi and di use the inverse of T(p). Read our Comment to the program.
This program calculates some types of Collatz-like sequences, which for all positive odds, fall into only one trivial cycle.
In a Comment to the program it is proved (for one type) that the sequences enter into a trivial cycle. The other types of sequences are proved to be related straightly to a Collatz sequence. The program also calculates these corresponding Collatz sequences.
The program Collatz-like sequences with one of two possible trivial cycles calculates, for positive odds, the sequence numbers from T(p) = (p + 3)/2^x. If p is a multiple of 3, the sequence falls into the trivial cycle 3 (2) 3. If p is not a multiple of 3, the sequence enters the trivial cycle 1 (4) 1. In a Comment to the program it is proved that (in spite of its Collatz-like form) the sequences do not have a connection to Collatz sequences.
The program Collatz-like sequence type with trivial and non-trivial cycles calculates, for positive odds, the sequence of iterates of
T(p) = {(p + 3k)/2x | k ∈ [1,8]}. From the starting value and k, the cycle into which it falls and the number of elements of the cycle can be calculated. If the starting value ≤ 3k the whole sequence is the cycle. This sequence type does not have connections to Collatz sequences, as explained in the Comment to the program.
In the program Collatz-like sequences of Gaussian integers the domain of Collatz-like sequences has been extended to the complex plane: it calculates the iterates of F(p) = {ap + b (if p/c is not a Gaussian integer) ∨ p/c (if p/c is a Gaussian integer)} in which p, a, b, c are Gaussian integers. A Gaussian integer is a complex number x + iy in which x and y are integers. The program also searches for cycles. In a comment some sequence types are given.
The program Juggler sequence gives the results of iterating the function F(p) = {⌊√p⌋ (if p is even) ∨ ⌊p√p⌋
(if p is odd)}, which has a distant relationship to the Collatz sequence. To obtain even and odd iterates the floor function (rounding to lower integer) is used. The sequence always reaches 1 probably.
The Collatz function T(p) can be characterized by two different procedures: one procedure is applied in case of p is odd and the other is applied in case of p is even.
What happens if these procedures are made independent of the parity of p? We did so in the program Collatz sequence and probability. Which Collatz procedure is
applied in this program, depends on the parity of an integer q now. The integer q ∈ {0, 1, 2, 3, ... , 9} and is selected randomly from this set (in each iteration).
As the parity of p is no longer decisive in this new function, the domain of p has been enlarged to positive R. All sequences seem to converge.
The program Collatz sequence and adjustable probability calculates the sequence from the function F(p) = {(3p + 1)/2 (with probability q) or p/2 (with probability 1 - q)}. Your input is p and q. Sequence calculation is ended after 10000 iterations or when the iterate p exceeds 10 ^ 30 or becomes ≤ 1. In addition the final iterate is estimated, calculated from the starting value, the expected growth and the number of iterations. Read the explanation and discussion in our Comment to this program.
The program Relative frequency of Collatz divisors calculates Collatz sequences (going from odd to odd) and their Collatz divisors (powers of 2), shown between parentheses between successive odds. It also calculates the relative frequency of each type of Collatz divisor and the geometric mean of all Collatz divisors occurring in the sequence.
In the program Expected growth of successive Collatz odds you can calculate P(n) = (3/2)^(1/2) ∗ (3/4)^(1/4) ∗ (3/8)^(1/8) ∗ (3/16)^(1/16) ∗ ... ∗ (3/2^n)^(1/2^n) as a function of n. The limit of P(n) for n → ∞ = 3/4. This is the expected growth factor from odd to odd in the long run of a Collatz sequence (provided that the underlying assumptions of the approach are right). It is used as a probabilistic heuristic argument against divergence of Collatz sequences. In a Comment a proof of the formula is given.
For Collatz sequences going from positive odd to positive odd (by definition) some properties have been defined. The program Computational properties of Collatz sequences calculates all these properties of a sequence (maximum number of digits of calculation numbers: 12). For each of the properties (Length, Descent, Maximum, Evenness, Rho, Tau, Ripple and Upsilon) there are separate programs for batchwise screening of consecutive odds (batches: 1, 20, 50, 200, 500 and 2000), which find the highest sequence property value of the batch and make finding sequence property records (see Definitions) easier. For each sequence property there are Record Tables showing all the records which can be found with the programs.
Graphs of computational properties of reduced Collatz sequences contains programs for batchwise screening of consecutive positive odds (500 at a time). The properties Length, Descent, Maximum, Evenness, Rho, Tau, Ripple and Upsilon of the reduced Collatz sequences of a batch of these odds are collected. Using Microsoft Office Excel 2010 some graphs have been made. In a Comment the graphs are discussed.
Odd multiples of 3: Computational properties of Collatz sequences
The program Odd multiples of 3: Computational properties of Collatz sequences calculates the properties Tau and Upsilon of odd multiples of 3. For each of these properties there are separate programs for batchwise screening of successive positive odd multiples of 3 to find the highest sequence property value of the batch. The programs can be used to find Tau3 records and Upsilon3 records (see the separate file Definitions). All Tau3 records and Upsilon3 records, obtainable with the programs, are shown in the Record Tables.
The program finds positive odd multiples of 3 whose Collatz sequences, going from odd to odd by definition, have equal Length or equal Tau (see Definitions in a separate file of the program). It investigates 2000 consecutive positive odd multiples of 3 batchwise. If you input n or j and the first odd (up to 12 digits) of the batch, the output of the program is an enumeration of multiples of 3 having Lth(p) = n or Tau(p) = j and their sequences.
In the program Odd multiples of 3: Distribution of Collatz sequence properties Length and Tau the Collatz sequences of consecutive positive odd multiples of 3 (max. 500) of an adjustable interval are screened for Lth(p) = n or Tau(p) = j. Select Lth(p) or Tau(p) and the ordering of the results: by the size of n or j or by the occurrences of n or j. You can use the plus and minus button of the program for the next, respectively previous interval of the same size. The output is: for all n or all j their occurrences and p, the corresponding multiples of 3.
There exist different Collatz sequences of the same Length, Lth(p) = Lth(p') = n, and the same Evenness, Evn(p) = Evn(p') = s. From the general Collatz equation, the Length n and the Evenness s of a positive odd p, the program calculates the minimum and maximum of a value A and investigates if there are positive odd integers p, such that A = 2^s - p.3^n. After input of n and s, the program shows all fitting odds p (if any) and their Collatz sequences (having Lth(p) = n ∧ Evn(p) = s). Read our Comment to the program.
The program Variables of the equation of reduced Collatz sequences has input fields for the positive odd p0, Σxi (= Evn(p0)), n (= Lth(p0)), A (= part of the equation), xi (= set of Collatz divisor exponents). Your input is one of six input sets: {p0}, {Σxi, n}, {Σxi, A}, {n, A}, {A}, {xi}. The program calculates all reduced Collatz sequences and their (remaining) variables which meet the requirements of your input. Sometimes there are several solutions. In a Comment the algorithms and the restrictions of the program are discussed. Some examples are included.
The program Equal Length of reduced Collatz sequences of neighboring positive odds searches for pL, the nearest odd < p having Lth(pL) = Lth(p) and for pH, the nearest odd > p having Lth(pH) = Lth(p).
The sequences are presented in columns in order to see their similarities and differences easily.
The program Constrained combinatorial compositions and Collatz sequences calculates and enumerates the compositions of an integer n having k parts. In a Comment to the program it is explained how the k exponents xi in the Collatz equation can be considered as the parts of a combinatorial composition of the integer s = Σ xi.
Reduced Collatz sequences having equal Length: number of iterations (from odd to odd) to reach 1, and equal Evenness: sum of the Collatz divisor exponents, have different compositions of their Collatz divisor exponents. These compositions have a substantial number of parts in common. The program Constrained compositions of Collatz divisor exponents finds such sequences and their compositions by screening adjustable batches of maximal 3000 positive odds. The odds are allowed to have up to 12 digits. Maximum sequence Length: 250; maximum sequence Evenness: 550. Read our Comment with examples.
General math tools
Permutations and combinations and their enumeration
Matrices and determinants
Quadratic equation
Cubic equation
Quartic equation
Powers of 2 and 3
Arithmetic sequence and series
Geometric sequence and series
Harmonic sequence and series
Alternating harmonic sequence and series
Farey sequence
Operations with complex numbers in Cartesian form
Conversion of complex number forms
Conversion of angles
Complex numbers in exponential form: Operations and functions
Faulhaber's formula
Greatest Common Divisor
Least Common Multiple
Factorization
Generation of primitive Pythagorean triples
Diophantine equations
Sum-of-divisors function
Some linear recurrence sequences
Closed form solutions of some linear recurrence equations
General calculator
Euler's totient or phi function
196-Algorithm
Ulam numbers and Ulam-type sequences
Catalan numbers
Factorials and primorials
Figurate numbers
Pascal's triangle
The program Pascal's triangle* enables you to calculate binomial coefficients.
With the program Permutations and combinations and their enumeration* you can calculate the number of arrangements of various types of permutation and combination and enumerate them.
On the page Matrices and determinants you can select programs for several real matrix operations: addition, subtraction, multiplication*, transpose, inversion, formation of the matrix of cofactors and the adjoint of a matrix.
A program for evaluation of determinants (order up to 8) is also present. The dimensions of matrices are adjustable up to 8 rows and columns.
The program Quadratic equation* calculates and verifies the real or complex roots of a second degree real polynomial equation in one variable (quadratic equation).
The program Cubic equation calculates and verifies the real or complex roots of a third degree real polynomial equation in one variable (cubic equation), using Vieta's substitution.
The program Quartic equation calculates the roots of a fourth degree real polynomial equation in one variable (quartic equation), using Ferrari's method. The real or complex roots are verified with Vieta's formulas.
In Powers of 2 and 3 the maximum value of the exponent of 2 is 54. This power has 17 correct digits. The maximum value of the exponent of 3 is 33. This power has 16 correct digits.
In general: all other programs on this site are programmed to accept, generate or process integers having an investigated and checked maximum number of digits, which is considerably lower mostly.
From your input the program Arithmetic sequence and series generates the numbers of the arithmetic sequence and the partial sums of the arithmetic series.
The program Geometric sequence and series generates the numbers of the geometric sequence and the partial sums of the geometric series from your input. If the series
converges, it's limiting value is calculated.
Harmonic sequence and series is a program that generates the numbers of the harmonic sequence and the partial sums of the harmonic series (harmonic numbers). The series diverges slowly to infinity.
The Alternating harmonic sequence and series progam calculates the numbers of the alternating harmonic sequence and the partial sums of the alternating harmonic series. The series converges to ln 2.
The program Farey sequence calculates the terms of Farey sequences up to the order of 50.
Operations with complex numbers in Cartesian form is a calculation program for addition, subtraction, multiplication and division of complex numbers in Cartesian or rectangular form.
Conversion of complex number forms is a program for conversion of notation forms. The program can be used to convert forms of complex numbers from/to Cartesian or rectangular, polar and exponential form.
Conversion of angles is a program you might use for conversion of angles from/to decimal degrees, degrees/minutes/seconds and radians.
Complex numbers in exponential form: Operations and functions is a calculation program for complex numbers: operations and functions in exponential form: multiplication, division, real powers, root extraction and logarithm.
The program Faulhaber's formula calculates some integer powers of the natural numbers and their sum straightly. The final sum is also calculated with the (shown) Faulhaber's formula.
The program GCD* calculates the Greatest Common Divisor of 2 integers having up to 16 digits inclusive.
The program LCM* calculates the Least Common Multiple of two positive integers.
In the program Factorization* the prime factors (and its eventual powers) of any number are calculated (12 digits are allowed).
The program Generation of primitive Pythagorean triples uses Euclid's formula to calculate the sides of a primitive right triangle from any pair of positive integers m and n meeting the conditions: m > n, m and n coprime (no common factor), m or n even. A primitive right triangle has integer side lengths without a common factor.
The program Diophantine equations solves linear Diophantine equations having 2 variables. You enter a, b and c, which are positive or negative integers
having 6 digits at most. The solutions are given as two equations in n (n is any positive or negative integer or 0). If you want only
solutions in N (natural integers), the solutions (if any) are given as two equations in |n| (positive integers or 0), having
conditions for |n| eventually.
The program Sum-of-divisors function calculates the Sigma function of a positive integer n: the summation of the kth power of all positive integers d dividing n.
If k = 0, it simply counts the number of divisors. In addition, the program shows the divisors d of n and factorizes n.
The program Some linear recurrence sequences* has options to calculate the Fibonacci-, Lucas-, Pell-, Pell-Lucas-, Jacobsthal- and Jacobsthal-Lucas numbers. In addition: all sequence numbers are factorized.
The program Closed form solutions of some linear recurrence equations uses closed form formulas of the Binet-type to calculate the nth term of the sequences of Fibonacci-, Lucas-, Pell-, Pell-Lucas-, Jacobsthal- and Jacobsthal-Lucas numbers. In a Comment to the program these formulas are shown.
The JavaScript driven General Calculator presented here, has some special features. You use your keyboard to enter data in the textbox. A copy of your input and the calculation results in the textbox are also shown in an additional textarea. A second textarea gives error messages and additional information eventually. We made an extensive manual. This help file is reached through the Help button on the calculator itself.
In the program Euler's
totient or phi function the totient φ(n) of a positive integer n is calculated. The totient is the number of positive integers ≤ n which are coprime to n. The numbers p in the phi function are the distinc primes dividing n.
The phi function is multiplicative: φ(a) * φ(b) = φ(ab).
The program 196-Algorithm calculates palindromic numbers. This algorithm adds the reverse of a number (the number read from right to left) to the number itself. This procedure is repeated with the sum, until a palindromic number is obtained. A palindromic number is the same number when read from left to right as when read from right to left (comparable with palindromic words like testset or racecar). Some numbers seem to have an endless sequence. One of them (Lychrel numbers) is the number 196. But there are more.
The program calculates some Ulam numbers or terms of Ulam-type sequences (1-additive sequences).
The program Catalan numbers calculates 23 Catalan numbers at most. Catalan numbers occur in combinatorial mathematics in various counting problems. They answer questions comparable with Euler's division problem: in how many ways a regular polygon (n-gon) can be divided in (n - 2) triangles,
if different orientations are counted as new ways?
The program Factorials and primorials calculates factorials (n!), double factorials (n!!), triple factorials (n!!!) and primorials (n#). A primorial is the product of the first n prime numbers. Note: n!! is not equal to (n!)! and n!!! is not ((n!)!)!
The program Figurate numbers calculates the first 1000 triangular, square, pentagonal, hexagonal, heptagonal, octagonal numbers, in general: s-gonal numbers with s up to 1000. The program also calculates the corresponding centered and pyramidal figurate numbers. In addition (centered) cubic, octahedral, star and pentatope (4-hypertetrahedral) numbers are calculated. The used formulas for calculation of the various figurate numbers are given in a separate file.
Other mathematical conjectures
Perfect number test
Aliquot sequence
Mersenne primes
Factors of Mersenne numbers
Harmonic divisor number test
The program Perfect number test calculates the sum of the proper positive divisors of a positive integer (12 digits at most). Tested numbers are perfect, deficient or abundant.
The program Aliquot sequence calculates 30 numbers of an Aliquot sequence (at most, if necessary). The input number may have 8 digits at most and sequence numbers should not exceed 12 digits. It recognizes common termination and perfect, amicable, sociable, or aspiring cycles and open end (Lehmer?) type numbers.
In the program Mersenne primes Mersenne numbers are tested for primality. The maximum value of n in 2^n - 1 is 40.
The program Factors of Mersenne numbers searches for any factor (not necessarily prime) of Mersenne numbers.
The program Harmonic divisor number test calculates the harmonic mean of all the divisors of the positive integer of your input. If this harmonic mean is integer, you found a harmonic divisor number. In addition the program shows all divisors and it factorizes the number of your input.
The Goldbach conjecture states that any even positive integer > 2 can be expressed as the sum of two primes.
Goldbach partitions
Probably any positive even integer > 2 can be expressed as the sum of two primes (a Goldbach partition).
Sometimes an even integer has several Goldbach partitions. The program calculates them.
Programs The twin prime conjecture
The twin prime conjecture states: there are infinitely many primes p such that p + 2 is also prime.
Generation of twin primes, cousin primes and sexy primes
Prime gaps
This program generates twin prime pairs (primes p, p + 2), cousin prime pairs (primes p, p + 4) and sexy prime pairs (primes p, p + 6). The primes of cousin prime pairs and sexy prime pairs are not necessarily successive.
The program Prime gaps looks for successive primes p, p + 2k | k ≥ 1. If k = 1, p and p + 2k is a twin prime pair.
For each k the de Polignac's conjecture states that there are infinitely many successive primes p, p + 2k.
The Legendre conjecture states that there is at least one prime number between n ^ 2 and (n + 1) ^ 2.
Legendre
With the program Legendre you can 'verify' the Legendre conjecture.Programs The abc conjecture
Abc-triples are positive coprime integers a, b and c such that a < b < c , a + b = c and rad(abc) < c. The radical of abc, denoted as rad(abc), is the product of the distinct prime factors of a, b and c. The strong version of the abc conjecture states that there are only finitely many abc-triples such that log(c) / log(rad(abc)) > h for all real h > 1. The weak version of the abc conjecture states that there is a maximum of the quality value: log(c) / log(rad(abc)). That means: there exist eventually no abc-triples having a higher quality.
Quality of abc-triples
The program Quality of abc-triples checks the triple numbers of your input for being an abc-triple and if so, it calculates its quality.Programs The Riemann hypothesis
The Riemann hypothesis states that all non-trivial zeros of the Riemann Zeta function ζ(s), defined for all complex numbers s (≠ 1), lie on a critical line ½ + it
(i is the imaginary unit, t any real number). This conjecture is connected to the distribution of prime numbers. Many mathematical
proofs are only true if the Riemann hypothesis holds.
Prime generation and prime counting function pi(x)
Euler product formula and Riemann zeta function
Kolakoski sequence
Sweet Chomp Kimberling sequence
Keith numbers
Handshakes
Magic chaos game
Curious sequence 153
Efron's dice game
Number pattern
Sum and product puzzle
Number pairs having equal sum and product
Hamiltonian cycle game
Peg solitaire
Monty Hall game
A new integer sequence
Albert and Edward puzzle
Puzzle: RSI or math
Viviani's theorem
In Prime generation and prime counting function π(x)* primes are generated and counted batchwise. At each start value a recommended maximum final
value of the batch is given (to keep calculation time acceptably). The prime counting function π(x) is calculated by addition of the results from (several)
batches. Some results are shown in a table.
The program Euler product formula and Riemann zeta function enables you to compare an approximation of the limit of the Riemann zeta function ζ(s) (summation of 1000000 of its terms)
with a calculation of the Euler product of k factors (1200 at most) of the Euler product formula. Your input is: the real exponent s > 1 for the zeta function and the number of factors k for calculation of the Euler product. The corresponding primes are generated automatically.
Find perfect cuboid and Euler bricks
A perfect cuboid has integer edges, face diagonals and space diagonal (and a ≠ b ≠ c). Up to now, nobody found a perfect cuboid. However, also nobody has proven that it cannot exist.
If all edges and face diagonals are integer, but the space diagonal is not integer, the cuboid is called an Euler brick. The program Find perfect cuboid and Euler bricks
calculates the (remaining) edges, face diagonals and space diagonal, if you input 3 of their lengths. The program checks the mutual
independence of the input values and gives conditions for their relative sizes. Some example Euler bricks are given in a comment to the program.
The Kolakoski sequence describes itself. It has infinitely many terms of 1's and 2's. In a Comment to the program the iteration procedure is given. The program calculates 500000 runs at most. In addition the number of 1's, 2's and the fraction of 1's are calculated. Many questions related to the Kolakoski sequence are still unanswered.
Sweet Chomp is a strategic board game for 2 players. At each turn a player should click a sweet in a block of sweets, eat it together with all sweets to the right and above it. The player who is forced to eat the poisoned sweety in the lower left corner loses. The number of rows and columns of the sweets can be adjusted up to 15. The game theoretical question is to find a general winning strategy.
Starting with the sequence of positive natural integers, in each iteration the order of some numbers of the previous sequence is changed
according to definite rules and one of its numbers is added to the Kimberling sequence. The program Kimberling sequence generates
the Kimberling sequence (500 terms) and shows its underlying sequences. Our accompanying comment explanes the iteration rules. An open
problem is: does the (infinite) Kimberling sequence contain all the positive integers? The Kimberling sequence can be sorted to see eventually missing elements at a glance.
A Keith number (or repfigit) is a positive n-digit integer p > 9 which becomes a term of a sequence of which each term is the sum of the previous n terms
(Fibonacci-like). The sequence starts with the n respective decimal digits of p. The program Keith numbers calculates the sequence numbers of any positive integer > 9 (12 digits at most) and ends
calculation when the number of your input becomes a sequence number (you found a Keith number!) or when the sequence numbers pass p clearly.
It is conjectured there are infinitely many Keith numbers.Their occurrence is rather rare.
Mathematical proof of the existence of God
Convince yourself and save your soul.
Handshakes is a beautiful brain teasing logical puzzle created by the mathematician Paul Halmos (1916 - 2006).
Amazing: the sum of 6 numbers, chosen at random, is always the same. That must be magic!
The algorithm of this curious sequence is: take any positive multiple of 3. Sum the cubes of its digits. Now take this sum. Sum the cubes of its digits. On continuation of this procedure, the obtained sequence always falls in the cycle 153, 153.
The Efron's dice game has four cubic dice with unusual numbering. The numbering is based on a statistical trick: nontransivity of the relation 'die X beats die Y' between pairs of dice. You choose a die and your opponent (the computer) chooses its die from the remaining dice. If you lost after playing 10 turns each (at least), try another die and play again.
Puzzle: put the numbers 1 to 8 into the 8 fields in such a way that connected fields do not contain consecutive numbers.
The famous Sum and product puzzle is not easy. The problem is to find two numbers from a short dialogue between two mathematicians: one of them knows the sum and the other knows the product of these numbers. We made some tools to help you. In a Comment the solution is discussed and some additional tools are presented.
The numbers of the number pair (2,2) have equal sum and product. There are more such pairs. The program Number pairs having equal sum and product calculates them. Find the used calculation formula.
You are invited to visit all the squares of a chessboard exactly once with one knight (Hamiltonian path). If your last move is one jump away from the knight's initial position, you found a sequence of jumps which is called a Hamiltonian cycle.
In the board game Peg solitaire you have to jump a peg horizontally or vertically over an adjacent peg into a hole two positions away. The jumped peg is removed then. The goal is to empty the entire board except the central hole. It is also possible to play the game in reverse. In addition you can play an example solution in the normal or reverse mode.
Assume you are a winner on a television game show and you are asked to select one of three closed doors. You will win what is behind it. Behind one door is a beautiful new car. Behind the others, goats. You select a door and the host (Monty Hall), who knows what's behind the doors, opens another door, behind which is a goat. He then says to you: "Do you want to switch to the other unopened door?" The Monty Hall game is a simulation of this situation. It can be played very quickly, thus giving your strategy to win a car, an experimental (statistical) base, when played repeatedly.
The program A new integer sequence shows its terms. You are invited to unravel this sequence.
The speedboats of Albert and Edward sail in different directions of a strongly streaming river. The puzzle is an analogon of a famous experiment with an unexpected result in the history of physics.
You can solve this puzzle without getting Repetitive Strain Injury, using some math. Your ergotherapist and your math teacher will appreciate that.
This geometric theorem is presented as a brainteaser. Try to rediscover it.