6 ms·
The derivative of a number (2014)
- Almondsetat 2y agoI have found the Wikipedia entry to be much clearer and interestig than this article https://en.m.wikipedia.org/wiki/Arithmetic_derivative https://en.m.wikipedia.org/wiki/Arithmetic_derivative
- tromp 2y agoNon-mobile link: https://en.wikipedia.org/wiki/Arithmetic_derivative https://en.wikipedia.org/wiki/Arithmetic_derivative
- keepamovin 2y agoYeh the link is good, and I think the article is good too, discussing some limitations / gotchas / cons. Gives me the impression maybe a more useful definition could be crafted, but also that this D function could be unexplored and yield some cool stuff :) haha!
- yau8edq12i 2y agoThe article also contradicts Wikipedia, e.g., the article claims that Barbeau introduced the derivative in 1961, but Wikipedia gives several references to Shelly's definition of the derivative in 1911. You'd expect an emeritus professor to have enough time on their hands to check their sources...
- playingalong 2y agoThey likely weren't emeritus in 1961.
- lupire 2y agoThe article is 2014, when Lipton was 64. So maybe emeritus, maybe not.
- yau8edq12i 2y agoI'm talking about the author of the article, Lipton. Not Barbeau who is the subject of the article itself, not its author.
- samatman 2y agoOne of the nice things about Wikipedia is that you can use it as a time machine, instead of just blindly throwing about accusations. If you look at the first page in 2014, the time of the article, you'll find this: https://en.wikipedia.org/w/index.php?title=Arithmetic_derivative&oldid=593878052 https://en.wikipedia.org/w/index.php?title=Arithmetic_deriva... > E. J. Barbeau was most likely the first person to formalize this definition. This suggests to me that Shelly's earlier definition in 1911 was not generally known. Indeed, Wikipedia has been a significant driver in rescuing earlier results in mathematics from obscurity. But you can't cite what you don't know. So I wouldn't expect an emeritus professor, or anyone, to have either a time machine or a crystal ball.
- yau8edq12i 2y agoLook, I'm a professor of mathematics at a research university. If I decided to use Wikipedia as my sole source for deciding who to credit for what, my papers would get rejected when they inevitably become wrong. "it wasn't on Wikipedia" is hardly an excuse when it comes to ethics. What is known by the average Wikipedia editor is not what is known by experts in the field.
- thecodedmessage 2y agoWould you have found out about those earlier sources without Wikipedia? I think it really depends on how obscure they actually were. I’d take the fact that neither Wikipedia nor this article knew about these earlier sources in 2014 as evidence that they were pretty obscure.
- yau8edq12i 2y agoYou don't need to reply twice to make your point. > Would you have found out about those earlier sources without Wikipedia? I'm not an expert in this domain. The author is.
- thecodedmessage 2y ago“Ethics” for what is almost certainly an honest mistake with a reasonable diligence of research? Accusing someone of ethics violations should require more research than you’ve done!
- bjornsing 2y agoThis function D on the integers might be interesting, but why call it a derivative? I can’t see much conceptual similarity with calculus derivatives.
- keepamovin 2y agoI'm just reading about it now, but I think because the derivative power rule holds for it, and you can do partial derivatives based on primes. The linked wikipedia article covers it well in Elementary properties.
- tromp 2y agoAs Wikipedia puts it, the > number derivative is a function defined for integers, based on prime factorization, by analogy with the product rule for the derivative of a function that is used in mathematical analysis.
- constantcrying 2y agoBecause it obeys a similar rule to derivatives on functions. The pattern of taking a concept and extending it to other things by looking only at what happens under one rule, is extremely common in mathematics. That way you can e.g. extend the definition of a derivative to non-continous functions.
- im3w1l 2y ago> The arithmetic derivative can also be extended to any unique factorization domain (UFD),[6] such as the Gaussian integers and the Eisenstein integers, and its associated field of fractions. If the UFD is a polynomial ring, then the arithmetic derivative is the same as the derivation over said polynomial ring I was just skimming the wikipedia article but this seems like a good argument.
- lordfrito 2y agoI my naive mind, if you can differentiate a number than you should be able to integrate it. So what then is the integral of a number? if I(n) is the integral of n, then shouldn't I(D(n)) == n? But if D(prime) = 1, then what prime is the answer to I(1) ?? If this can't be done, then what were doing here isn't differentiation as I understand it. So why call this the derivative of a number? Why not call it something else?
- yau8edq12i 2y agoIt is, indeed, not differentiation in the sense you're used to. Here it just means a map that satisfies the Leibniz rule, (fg)' = f' g + f g' or D(fg) = D(f) g + f D(g). Maps with this property are usually called "derivations". Although you might also want to consider that "integration" (really, indefinite integrals, AKA antiderivative) is only defined up to a constant. So why couldn't it be the same for this "number derivative"? Perhaps the "antiderivative" is only defined up to something. It'd be a fun exercise, if you're interested. Can you figure out under what conditions do you get D(a) = D(b)? Put differently, given an integer c, what are the solutions to D(x) = c?
- plank 2y agoSolutions to D(x)=C is probably something like p_a^a * p_b^b * … * p_n^n with a+b+d+…+n (yes, I am skipping c) equal to your constant C, and p_a, p_b etc all prime.
- yau8edq12i 2y agoNo, that looks wrong. Take c = 2, for example. You seem to be saying that p^2 ought to be a solution. But D(p^2) = 2p (because D(p^2) = D(p) p + p D(p) = p + p = 2p).
- GrantMoyer 2y agoStarting from my discussion in [1], you can find a sort of antiderivative of natural numbers by finding which natural number (if any) ∫F_n maps to. Note however that D is not injective and has no inverse. [1]: https://news.ycombinator.com/item?id=40327885 https://news.ycombinator.com/item?id=40327885
- xelxebar 2y agoComments on the OEIS sequence D(n) are insteresting: https://oeis.org/A003415 https://oeis.org/A003415. One in particular points out that if we take the prime factorization of n = p0*p1*...*pk, where the pi aren't necessarily distinct, then over the reals lim (p0+h)(p1+h)...(pk+h) - p0*p1*...*pk D(n) = h->0 ------------------------------------ . h This motivates the D(p)=1 definition, meaning we can take D to be defined just by the Leibniz rule. (Note that D(1) = D(1*1) = 1*D(1) + D(1)*1 = 2*D(1), implying that D(1)=0, so that part of the definition is redundant.) Others have pointed out that the definition also works for any unique factorization domain, and in the case of polynomials, the Leibniz rule guarantees D agrees with the standard derivative, which is also a nice sanity check.
- xpe 2y agoPeople may disagree about the use of "derivative" as used in the article. May the bludgeoning-by-definition continue! Alas, if one day we tire of definitional-skull-splitting... ... for some given function, we can simply recognize the difference between: (a) the function definition; (b) properties of the function. For the (calculus) derivative: (a) means "rate of change"; (b) means the usual derivative properties e.g. the product rule and chain rule For the arithmetic derivative [1] (or number derivative): (a) means "1 for any prime; everything else calculated via the product rule" [2]; (b) means the same as above There are other examples of the above a/b split in mathematics. Finding examples is left as an exercise for the reader. [1] https://oeis.org/wiki/Arithmetic_derivative https://oeis.org/wiki/Arithmetic_derivative [2] Yes, the definition of (a) makes (b) obvious.
- nobodyandproud 2y agoThe skull splitting is a natural reaction because this has nothing to do with differentiation. Throw in Leibniz’s rule and the reader is reduced to reading the fine print to understand. The articles (Wikipedia included) are as guilty of this as whoever chose this name.
- eigenket 2y agoThis definition does actually have a surprising amount to do with differentiation. The definition works for any unique factorization domain and in particular for polynomials. It turns out that the definition here exactly matches the usual derivative for polynomials.
- xpe 2y agoAre you saying that for arithmetic derivatives, the definition (part "a" above) "1 for any prime; everything else calculated via the product rule" has a surprising amount to do with differentiation? If so, can you connect the dots? Or did you mean the properties (part "b" above)?
- eigenket 2y ago
- DerekL 2y agoTitle needs (2014).
- ykonstant 2y agoThis is one of the many examples of geometric concepts being applied to integers (in this case, the notion of derivation, although a non-linear one). Another important concept is that of a curve and its ring of functions in algebraic geometry; for the integers, the curve is the prime spectrum of Z, i.e. the prime ideals generated by each prime number <p>. The ring of regular functions is precisely the ring of integers, operating as functions on prime numbers by n(p) = n modulo p. I wonder if D has any interpretation in terms of nonlinear differential operators on Spec(Z).
- bandrami 2y agoAre you saying the derivative is a geometric concept? Tangent slope of a curve is simply one application of a derivative; it's not the derivative's identity. What the derivative is is the inverse of an inner product.
- ykonstant 2y agoCan you people stop with the inane pedantry? Yes, the derivative is a geometric concept and so is the inner product; they are at the core of what a Riemannian manifold is, they group to form the (co)tangent spaces of varieties and schemes and their derived structures produce the local geometric data of the object in question.
- lupire 2y agoThe point is that the derivative is a more general concept than just geometric, and is naturally defined with or without a geometric comtext. Of course almost anything can be modeled geometrically. You can draw a picture of almost anything. The integers themselves are obviously geometric, by drawing a kindergarten number line. https://en.m.wikipedia.org/wiki/Langlands_program https://en.m.wikipedia.org/wiki/Langlands_program
- ykonstant 2y agoThis is all semantic nonsense that devalues the original post I made about a potential connection between two arithmetic-geometric objects. But thanks for patronizing me, a research mathematician actually working on the arithmetic Langlands program, with a wikipedia link to the fucking Langlands program.
- deleted 2y ago[deleted]
- GrantMoyer 2y agoMathematicans like to call two things with the same "structure" by the same name, even if it's not obvious how they're otherwise related. In this case, the shared structure is that both the derivative of a function and D(n) follow the product rule of derivatives. Sharing a structure means two mathematical objects are "morphic" (homomorphic[1], isomorphic[2], etc.) in some way, so in some sense they are the are same object. In this case, we can construct a morphism. Since D(n) follows the product rule, we only need to find a function f of x for each prime p which at some x has a value of p and a derivative of 1. Then we can compose those functions by multiplication for all other natural numbers. f_p(x) = x + p is one such set of functions, giving us the complete function F_n(x) = Π_(p∈P(n)) x + p, where P(n) is the set of prime factors of n. Note, the product of the empty set is defined to be 1, so F_1(x) = 1. Finally, the homomorphism between D and the derivatives of functions is that D(n) = F'_n(0), so in some sense, D really is a derivative. [1]: https://en.wikipedia.org/wiki/Homomorphism https://en.wikipedia.org/wiki/Homomorphism [2]: https://en.wikipedia.org/wiki/Isomorphism https://en.wikipedia.org/wiki/Isomorphism
- supernikio2 2y agoI'm rather new to the concept of objects and morphisms myself, but I love how fields like category theory allow one to "zoom out" far enough in abstraction that two seemingly different concepts are actually the same applied to distinct contexts.
- BalinKing 2y ago> so in some sense they are the are same object. My understanding is that this is only the case if they’re isomorphic—even a pair of homomorphisms between the objects is not itself sufficient to identify them as the same. But I also don’t know any category theory, so I might be spouting nonsense :-)
- GrantMoyer 2y agoIndeed, a homomorphism from A to B is an isomorphism from A to a subset of B. In other words, homomorphism is to injective as isomorphism is to bijective. So whether you say A is equivalent to B depends on how you define equivalent. For anyone curious, while Category Theory is very concerned with morphisms, they also come up in many other places. In particular, Abstract Algebra (groups and rings and such) may be a more approachable introduction to morphisms than Category Theory, and then Category Theory flows pretty naturally from the concepts of Abstract Algebra.
- nico 2y agoDerivative of a binary number: Think of any binary number as a sequence of 0s and 1s in a certain order For example, 16 in binary is the sequence: 1000 Reading the sequence from right to left, two bits at a time, for each one of those two bits, we can note if the value of the “earlier” bit in the sequence changed I can note a change as 1 and a not change as 0, then the above sequence becomes: 0 (0-0 no change) 0 (0-0 no change) 1 (0-1 changed) Result: 100 In decimal: 8 Now if I want to “integrate” that sequence, I can do the reverse, but now I have ambiguity, if I start with 0, the sequence would be the original: 0 0 (0 means no change) 0 (0 means no change) 1 (1 change) Result: 1000 But if we start with 1 instead: 1 1 (0 no change) 1 (0 no change) 0 (1 change) Result: 0111 Intuitively you can think of this as tracking a “discrete rate of change” Usually the derivative or slope of a function gives a real value, now imagine “zooming into” the function until you can’t track a real value anymore, only whether what you are looking at is changing or not every time you look
- nico 2y agoThis can also be generalized to anything that can be expressed as sequence generated by a function You can always just split the thing into it’s sequential elements, then get a pair-wise derivative in between the elements The sequence of pair-wise derivatives is then the equivalent of the derivative of the original sequence If you do this to the limit where the “space” between the elements is 0, then you get the continuous case
- johnthescott 2y agoentropy of a bit string may be another way to view the bitwise derivative. paper here for analyzing primes: https://arxiv.org/abs/1305.0954 [BiEntropy - The Approximate Entropy of a Finite Binary String]
- nico 2y agoThank you for the reference, these concepts are definitely closely related This is super interesting: > We successfully test the algorithm in the fields of Prime Number Theory (where we prove explicitly that the sequence of prime numbers is not periodic) What we do, and what ML algorithms try to imitate, when learning, is exactly that: finding loops (periodic sequences) within the data (or rather, fitting the data to continuous “loopy” representations)
- NegativeLatency 2y agoWhat does D look like around the origin? I was hoping for a plot or something, also pretty hard to search for.
- math_dandy 2y agoThis notion of derivative of a number depends very weakly on the number itself. It only depends on the multiset of exponents in the number’s factorization into a product of prime powers. In this way it’s like the divisor counting function, the omega and Omega functions, the möbius function, etc. As such, its value distribution might be interesting. Something analytic number theorists might like to play around with.
- dang 2y agoDiscussed at the time: The Derivative of a Number - https://news.ycombinator.com/item?id=8198607 https://news.ycombinator.com/item?id=8198607 - Aug 2014 (47 comments)
- zvr 2y agoInteresting... I'd imagine it's not common to have re-submissions of exact same links ten years apart, without other re-submissions in-between.
- pvg 2y agoIt's not that uncommon, in fact, there's another one of the front page right now with a bigger gap: https://news.ycombinator.com/item?id=40329173 https://news.ycombinator.com/item?id=40329173 https://news.ycombinator.com/item?id=2920379 https://news.ycombinator.com/item?id=2920379
- galaxyLogic 2y agoAs an aside there also exists the notion of Derivative of Regular Expression which has useful applications https://jvns.ca/blog/2016/04/24/how-regular-expressions-go-fast https://jvns.ca/blog/2016/04/24/how-regular-expressions-go-f....
- mikhailfranco 2y agoAs an aside on an aside, there is also the related classic: Conor McBride, The Derivative of a Regular Type is its Type of One-Hole Contexts http://strictlypositive.org/diff.pdf http://strictlypositive.org/diff.pdf related to Huet's Zipper and Hinze, Paterson Finger Trees, with a huge of follow-on literature: https://personal.cis.strath.ac.uk/conor.mcbride/Holes.pdf https://personal.cis.strath.ac.uk/conor.mcbride/Holes.pdf https://conal.net/blog/posts/differentiation-of-higher-order-types https://conal.net/blog/posts/differentiation-of-higher-order... and numerous old posts by sigfpe (Dan Piponi), e.g. http://blog.sigfpe.com/2008/06/blessed-mans-formula-for-holey.html http://blog.sigfpe.com/2008/06/blessed-mans-formula-for-hole...
- sigil 2y agoThis idea was used to great effect in Matt Might’s “Parsing with Derivatives” paper [0]! And it featured prominently in the Compilers class he taught at the University of Utah. [0] https://matt.might.net/papers/might2011derivatives.pdf https://matt.might.net/papers/might2011derivatives.pdf
- galaxyLogic 2y agoLooks very interesting. Does it mean that RegExp Derivatives can be used to parse languages which basic regular expressions cannot? As an example basic HTML cannot (?) be parsed by RegExp because tag-pairs can contain tag-pairs: <div> <div> </div> </div> eludes RegExp matching, it seems to me, because a typical standard RegExp would only match "<div> <div> </div>" and would not see the 2nd </div>. Can RegExp Derivatives do it better?
- banish-m4 2y ago
- mindcrime 2y agoOK, I apologize in advance for being "that guy" but I feel compelled to ask: are there any practical applications of this, in the sense of applications of the normal calculus "derivative" (eg, slope / "rate of change"). That is, would I ever calculate this "derivative" to solve any kind of real world engineering problem or anything? Or does this serve solely in the realm of pure (theoretical) mathematics?