Topics (384k) Articles (398k) Users (410) Discussions (242) Comments (383) Files (13k) New article
A class specifies a kind of object in a class-based object system, commonly declaring fields, methods and construction rules. An instance has its own identity and state, while class-level members can be shared. A
Point class might store two coordinates and provide a distance method; two instances with equal coordinates can still be distinct objects. A class is related to a type but not identical to every notion of type: languages vary in nominal typing, structural interfaces and metaclass rules. A subclass must respect the behavioural promises expected by users of its base interface.// Target: computer-science.bigb
In object-oriented programming, encapsulation packages an object's state with the operations that act on it and can restrict direct access to its implementation. It is the object-oriented use of encapsulation.
By David Bindel.
Cited passages: Changing shifts, §3, PDF p. 3: approximate eigenvector equation and Rayleigh quotient; Power iteration, §1, PDF pp. 1–2: diagonalizable expansion and nonzero first coordinate of the starting vector.
For positive integers , Jordan's totient function counts tuples of residue classes modulo for which . The coordinates together must avoid a common prime divisor of ; they need not each be units.
For each prime factor of , exactly tuples have all coordinates divisible by . The inclusion-exclusion principle, applied to simultaneous divisibility by the distinct prime factors, therefore givesIn particular is Euler's totient function. For , the formula gives . The pair is counted because , even though neither coordinate is coprime to six.
If a prime number divides a product of integers , then divides or (possibly both):For example, and . The hypothesis that is a prime number matters: , although six divides neither factor. When does not divide , the greatest common divisor of and is one; multiply Bézout's identity by to see that . Repeated application makes this the uniqueness step in the fundamental theorem of arithmetic. [ref]
https://mathcs.clarku.edu/~djoyce/elements/bookVII/propVII30.html. Euclid, Elements, Book VII, Proposition 30
.For a completely computed example, because , while shows that seven does not divide twenty. Bézout's identity becomes, after multiplication by ,The two terms on the right are divisible by seven, which explicitly recovers the forced divisibility of the second factor. Both alternatives can hold: , and seven divides both and .
In fact the property characterizes prime numbers among the integers greater than one. If is a composite number, choose with ; then , but divides neither nor . For several factors, repeated application of Euclid's lemma says that a prime number dividing their product divides at least one factor. In a product of prime numbers, that factor must equal it, because a prime number has no other prime factor. This is what prevents a different collection of prime factors from representing the same positive integer in the fundamental theorem of arithmetic.
Book VII, Proposition 30 of Euclid's Elements states the result in terms of a prime number measuring a product; its proof uses coprimality and ratios. The calculation using Bézout's identity above is a modern way to explain the same divisibility statement. [ref]
https://mathcs.clarku.edu/~djoyce/java/elements/bookVII/propVII30.html. Euclid, Elements VII.30, translated text hosted by David Joyce
For an integer modulus , a primitive root is a unit whose multiplicative order is . Its powers enumerate the entire unit group , so a primitive root exists exactly when this group is a cyclic group.
Modulo seven, successive powers of three give , reaching all six units. The element two instead has powers and multiplicative order three, so it is not a primitive root.[ref]
Orders of Units in Modular Arithmetic by Keith Conrad. §1, Example 1.1 and Definition 1.3, printed p. 1: orders of units modulo seven
Existence depends on . Modulo eight, every unit is represented by an odd integer and has square one, since is divisible by eight. No such element can generate a group of four units. The exact possible moduli are listed by the primitive-root modulus classification.
Every nonnegative integer is a sum of squares with four terms, with zero terms allowed. Precisely, for every integer , there exist nonnegative integers such thatAllowing arbitrary integer roots gives the same statement: changing a root to its absolute value leaves the resulting square number unchanged. Four is a uniform upper bound on the number of nonzero terms, rather than a demand for four positive terms. Repeated square numbers are allowed. Conrad states the positive case and explicitly explains the role of zero terms; follows by taking all four roots zero. [ref]
https://kconrad.math.uconn.edu/blurbs/ugradnumthy/descent.pdf. Keith Conrad, Proofs by Descent, Section 6, opening paragraph and Theorem 6.6
The small cases make the convention visible:In particular, could not be a sum of squares with four strictly positive roots, since each term would be at least one. Geometrically, a square of integer side length has area : the theorem says that any nonnegative whole-number total area can be split into at most four such square areas. It does not assert that those squares tile one larger square or a prescribed rectangle.
Why does the fourth term matter? Two square numbers do not suffice for : in modular arithmetic, a square number has remainder zero or one modulo four, so their sum cannot be three modulo four. The sum of two squares theorem gives a complete criterion for the positive integers representable with two terms. Even three terms leave gaps. A square number has remainder or modulo eight; adding three of these, with repetition allowed, never gives seven modulo eight. Thus cannot be sums of three square numbers, although Lagrange's four-square theorem represents all of them with four. This also proves that the bound four cannot be reduced to three.
The modulo-eight obstruction is not the only way that three terms can fail. For example, needs four: if three square numbers added to , their remainders modulo four would force all three roots even. Dividing by four would then express as a sum of three square numbers, contradicting the preceding calculation. These short checks explain the examples without requiring a full classification of sums of three square numbers.
The practical benefit of Lagrange's four-square theorem is an existence guarantee for a family of Diophantine equations: for every nonnegative integer , the displayed equation has an integer solution. It does not specify a unique solution. For instance, . To find a representation by a finite search, enumerate and test the sum. The floor function supplies a finite bound because no single term can exceed , and sorting roots removes duplicate orderings without discarding any possible sum. The theorem guarantees that the search succeeds.
A greedy algorithm that repeatedly subtracts the largest available square number need not find four terms: for it chooses , while uses four. The appeal of the theorem is this gap between local choices and a global promise: individual square numbers become farther apart, and two or three terms leave arithmetic obstructions, yet four terms cover every nonnegative integer.
For historical orientation, Conrad dates Lagrange's four-square theorem to and identifies the memoir as Démonstration d'un théorème d'arithmétique: it appeared in the Berlin Academy's volume for the year , published in , pages –. Keeping the volume year and publication year distinct avoids an apparent conflict between dates. [ref]
https://kconrad.math.uconn.edu/blurbs/ugradnumthy/descent.pdf. Keith Conrad, Proofs by Descent, Theorem 6.6 and reference 11
The Erdős-Turán inequality bounds how unevenly finitely many points fill the half-open interval by measuring finitely many Fourier modes. For define their normalized star discrepancy byThere is a universal constant such that, for every positive integer ,The finite-point form follows from the corresponding probability measure inequality by placing mass at each point of the unit circle represented by .[ref]
One more proof of the Erdős-Turán inequality, and an error estimate in Wigner's law by Ohad N. Feldheim and Sasha Sodin. Proposition 1, equation (1), printed p. 1; rescale the circle coordinate by and use the empirical probability measure
The cutoff trades an approximation error against the measured exponential sums. If each fixed nonzero Fourier mode tends to zero as grows, take the limit superior first with fixed, then let grow. This gives , the quantitative route to equidistribution.
For the grid with , every displayed exponential sum vanishes for by the finite geometric series. Choosing yields ; direct counting gives the sharper exact value .
Integer factorization seeks the prime factorization of a positive integer . For , this means identifying its prime factors and their multiplicities; one has the empty prime factorization. Finding one proper divisor is useful progress, but need not finish the job: factor and further until all factors are prime numbers.
For example, is a semiprime, whereas has three prime factors. Primality testing asks whether a proposed integer is prime; it need not return a factor when the answer is no. Trial division is a direct factoring method: try division by small prime numbers until a divisor is found. More elaborate methods obtain a proper divisor through a greatest common divisor of with a specially constructed integer.
The beautiful trick in congruence of squares is that two integers with equal squares modulo can reveal different factors through their sum and difference. In the worked example, gives and . Computing those greatest common divisors uses the Euclidean algorithm; it does not require trying every potential factor. A factor base supplies a systematic way to construct useful equal-square relations. [ref]
https://crypto.stanford.edu/pbc/notes/crypto/factoring.html. Ben Lynn, Factoring and Discrete Logarithms: congruent squares and the linear-algebra step
.This connection is useful in cryptography because recovering the factors of an RSA cryptosystem modulus defeats the factoring assumption behind its construction. That application concerns large, carefully chosen inputs; the small examples here explain the arithmetic mechanism and are not benchmarks or estimates of present cryptographic security.
Uracil is a pyrimidine nucleotide base with two carbonyl groups. It is common in RNA and ordinarily pairs with adenine.
It lacks the methyl substituent present in thymine. Its ribose nucleoside is uridine; phosphate-bearing derivatives then participate as nucleotides in RNA synthesis and other metabolic processes.
Thymine is a pyrimidine nucleotide base, structurally 5-methyluracil. It is a principal base in DNA and ordinarily pairs with adenine.
Its methyl group distinguishes it from uracil, the corresponding common RNA base. Thymidine adds a deoxyribose sugar, so a base and its nucleoside are different molecular species.
Cytosine is a pyrimidine nucleotide base found in DNA and RNA. Its carbonyl and amino groups support ordinary Watson-Crick pairing with guanine.
Chemical modification can change its biological meaning: methylated cytosine is important in several forms of gene regulation. Cytosine itself is the base; cytidine is the ribose nucleoside containing it.
Guanine is a purine nucleotide base containing carbonyl and amino functionality. In ordinary Watson-Crick pairing it pairs with cytosine through three hydrogen bonds.
Its ribose nucleoside is guanosine, and guanosine triphosphate adds three phosphate groups. The distinction separates base-pair recognition from the energy-transfer and signaling roles of a complete nucleotide.
Adenine is a purine nucleotide base with an exocyclic amino group. It occurs in DNA and RNA and in nucleotides such as ATP.
ADP contains the same adenosine unit as ATP, with two phosphate groups instead of three. One ATP converted by the stated hydrolysis gives one ADP and one inorganic phosphate: accounts for the phosphate groups while adenine and ribose are retained. ADP is therefore a reusable material carrier, rather than ATP with its entire structure discarded.
Regeneration reverses the net chemical reaction:At the same stipulated reference conditions its is , the negative of the hydrolysis value. It is an endergonic reaction and requires energy input through energy coupling; a catalyst alone cannot supply that input. Recycling the material carrier does not recycle the expended driving energy. Cellular respiration and light-dependent reactions supply routes for regeneration. See Cooper, The Cell: ATP generation and energy coupling.
ADP is a nucleotide with two phosphate groups. Formation of ATP from ADP and phosphate couples to energy supply in light-dependent reactions; the Calvin cycle returns ADP after using ATP. [ref]
https://openstax.org/books/biology-2e/pages/8-3-using-light-energy-to-make-organic-molecules. OpenStax Biology 2e, 8.3: recycling ATP and ADP
.ATP is a nucleotide consisting of adenosine, itself adenine joined to ribose, carrying three phosphate groups. From the ribose outward, these groups are labelled , , and . ATP connects energy-supplying processes to energy coupling for synthesis and active transport; the same carrier can be regenerated and reused. [ref]
https://openstax.org/books/biology-2e/pages/6-4-atp-adenosine-triphosphate. OpenStax Biology 2e, 6.4: ATP composition and recycling
.The net hydrolysis commonly used in energy coupling isHere denotes inorganic phosphate. At buffered pH , this biochemical shorthand groups the appropriate protonation states into pools and leaves proton exchange with the buffer solution implicit. An explicit, charge-balanced choice is , without implying these are the only chemical species present. See the IUBMB recommendations for biochemical thermodynamics.
The quoted textbook biochemical standard state value is approximatelyThis convention uses fixed pH , temperature (), reference pressure (), unit reference thermodynamic activities for dissolved reactants and reaction products, and water thermodynamic activity approximated by one. The prime indicates the fixed-pH biochemical convention. See OpenStax Biology 2e, 6.4: standard ATP hydrolysis value and Biology 2e, 6.2: biochemical standard conditions. This is a reference value, rather than a universal value inside a biological cell; precise tables must also specify chemical solution conditions and any magnesium ion binding convention. Different reference conventions and data treatments give different tabulated values, as discussed in Li et al., 2010: a database of thermodynamic quantities for biochemical reactions.
An exergonic reaction has a negative change in Gibbs free energy, so the overall ATP hydrolysis is favourable under those reference conditions. Breaking a chemical bond by itself costs energy; forming new chemical bonds can release energy. The net change compares all reactants with all reaction products, including their interactions with water and the entropy contribution. Calling the phosphate connection a "high-energy bond" describes a large favourable change in Gibbs free energy on hydrolysis, rather than energy released by bond breaking alone. See 7.5 Strengths of Ionic and Covalent Bonds and Cooper, The Cell: ATP and metabolic energy.
Composition changes the driving force. At the same fixed pH, temperature, pressure, and binding convention, write the molar reaction change asHere is the molar gas constant, the absolute temperature, and a dimensionless thermodynamic activity for a biochemical pool. Constant water thermodynamic activity is absorbed into the reference term; fixed pH accounts for buffered protons. The shorthand means transformed molar reaction Gibbs free energy change, , rather than a finite sample's total change. The natural logarithm acts on a dimensionless reaction quotient, never on concentrations with units. See the IUBMB biochemical thermodynamics recommendations and the general equilibrium constant relation.
For a stipulated ideal dilute chemical solution, let , with . Choose , , and , ignoring activity coefficient corrections and magnesium binding. These are illustrative inputs, not a claim about a particular biological cell. ThenandIncreasing tenfold raises by at this temperature. Thus the ATP to ADP ratio and available inorganic phosphate matter, even with the same standard state value. These are local molar predictions at the stipulated composition, rather than a constant total yield as an isolated sample reacts.
Pinned article: Introduction to the OurBigBook Project
Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
Intro to OurBigBook
. Source. We have two killer features:
- topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculusArticles of different users are sorted by upvote within each article page. This feature is a bit like:
- a Wikipedia where each user can have their own version of each article
- a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.Figure 1. Screenshot of the "Derivative" topic page. View it live at: ourbigbook.com/go/topic/derivativeVideo 2. OurBigBook Web topics demo. Source. - local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
- to OurBigBook.com to get awesome multi-user features like topics and likes
- as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
Figure 2. You can publish local OurBigBook lightweight markup files to either OurBigBook.com or as a static website.Figure 3. Visual Studio Code extension installation.Figure 5. . You can also edit articles on the Web editor without installing anything locally. Video 3. Edit locally and publish demo. Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension. - Infinitely deep tables of contents:
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact








