#elementary-number-theory
1 messages ยท Page 41 of 1
Yep, you've got it
I think I might know some nice solution to this
I was happy since I came up with all of this independently, but I just now checked OEIS and of course they've already got it hahaha
What are you thinking?
I was thinking use some sine waves to bounce between counters or something but
it'll just boil down to the same thing ultimately
have you considered trying to generalize it to N counters?
Yes! That's where I want to go next
Sounds good, it'd be fun to compare the final functions
I've almost got it
nice
@sacred junco Alright now I think I did it
cool
I'm curious to see how you did it but I guess you're trying to type up whatever monstrosity you got haha
mine's not nice that's for sure but it got the job done
To find the nth step of a sequence involving k containers, you can use:
There we go
And since it's the topic of the night, here we are as a singular expession:
That one's the monstrosity you predicted haha
I did some similar stuff
I used the ceiling function in the same way I think
but past that then I separated 'em apart using a fourier series which is something desmos could understand since it would probably spit errors at me if I tried a 0^0 thing
What does your solution look like?
Ah I thought that was just a picture
oh no you gotta click the link not the picture or it does that
Your technique is really interesting. Where do you learn how to work with this?
with fourier series?
I just like PDEs
I'm basically like screening out the parts I don't want and leaving the parts in I do want
it might help to explain the l(x) I wrote in there
=tex \ell(x) = \frac{1}{A} \sum_{k=0}^{A-1} e^{\frac{i 2\pi}{A} k}
it's actually going to be A if you don't divide by A, so that's how I normalized it
every other integer value that's not a multiple of A will have the effect of basically putting them around a circle or regular polygon in an equal way so that they cancel out
think like, vectors in equilibrium
you could just as well have written this with modular arithmetic with a generator
at any rate I just take this thing which is now an indicator function at x=0 mod A
and then I multiply it by the stuff I want while having it 0 where I don't
my h function is just the opposite I'm really just doing 1 - l(x) so it just inverts itself
since most of my values are represented by this h function
hopefully that's like, mildly clear
oh I should have explained, since l(x) has only outputs of real values, 0 and 1, it's actually just the same as if I replace it with the real part of that
which is how I wrote cosine since I think desmos doesn't handle imaginaries
I didn't check
I wonder what the analogy to this process would be, given imaginary inputs.
"How many marbles are in the third cup after 5i steps"
Yeesh
Hence the "yeesh" haha
I'm afraid I have zero experience with fourier series. I only know they're commonly used to approximate other functions.
yeah
it's hard to understand them without studying linear algebra if you haven't yet, definitely get on that
It's on my "to do" list ๐
I think the two most important things in math to study are calculus and linear algebra
and after a while they join together to form one subject lol
number theory is fun though too
either way you slice it, no matter what you do I think you can always find something from one field to use in the other though
basically each of these e^ikx terms are basis vectors for your space
and you're using dot products to find the projection of your function onto this space to get your coefficients
it's the same as a least squares problem in that you're approximating
but in math like, same thing goes for power series actually, your approximation can become exact
it's just a different basis in that case, {1,x,x^2,...}
I definitely prefer number-theory-style thinking over calculus-style thinking, if that makes sense
Although that may be because calculus feels like there's a higher barrier to entry before you can start working on proving things, whereas grade schoolers can consider problems such as "is any even number plus another even number also even?"
The sort of problem we've been working on now is the kind of thing I enjoy a lot
I know what you mean, I think each area of math sorta has its "ways of thinking" and it's hard to get into those separate mindsets
yeah I like this sort of problem style like you're saying too
I think I like to stay in the realm of math techniques that are like at around highschool level or so just cause the problems are more down to earth
I don't really care about counting rational points on elliptic curves or something like that personally
but I can be coerced into other stuff
yeah if you have some other problems you wanna work on I wanna try to do some
here's a problem I have enjoyed cause it's easy to say
find all prime triples that satisfy p^2+q=r^2
I think "highschool level" can be so appealing because, since you already have so much knowledge surrounding the question, you can really delve into it and appreciate its depth
The difficulty comes from the creativity required, not from needing to learn a ton of new material
find all prime triples that satisfy p^2+q=r^2
Uniqueness is interesting. I haven't quite gotten my hands dirty as far as rigorously proving that a set of solutions is the complete set of solutions for any problems yet
this problem only seems harder than it really is
Hm
you have any problems or whatever for me to work on while you're thinking about that one
or one you want to work on together while I'm here haha
I have a quick one I did a little while ago:
Let's say you're trying to find the square root of 12.
12 is closer to 4^2 than 3^2, so you assume that rounding sqrt(12) will give you 4, not 3.
Indeed this is correct. However, it doesn't apply to all real numbers. Which ones?
oh what I'm a bit lost on the reasoning going on
oh oh for some reason I thought you were using the factors of 12 = 4*3 and looking at sqrt(12) it being closer to 4^2 or 3^2 because of this lmao
just too much number theory wew
ok this is a fun problem nice
I have a handful of fun problems I've come up with/come across.
Some of them were really involved, at least for me haha. You know a problem is good when the answer doesn't hit you until months later
yeah definitely
I don't think a problem has to be hard or anything to be good that's for sure
hmm I came to some kind of contradiction but I will keep working on this problem you gave
this problem is not like supposed to be tricky is it
like since you say "all real numbers" when of course it doesn't work for negatives
cough
I hadn't thought of that, I immediately defaulted to positive real numbers when working on it
ok cool I did too but then I just came to a result that it's never true but, I probably just messed up my work but
just thought I'd double check haha
I guess while I'm on the subject, I know 0 and 1 are sorta weird
so if it's something like that I suppose I'll consider that
but I'm thinking there is a more broad range of possibilities
like I think many fractions are closer to 0 than 1, but if you square root them they get closer to 1
haha I'll just work on the problem I guess don't give it away I need something to do tomorrow while I'm bored at work
Sure, I also dislike spoilers
Speaking of, there's one unsolved problem I have. So far it's my longest-running one. I'm not sure if you were the one who saw it last time, but I'll bring it up in case you weren't.
This time I'd like to request no spoilers from you haha
Oh wait there's a formatting error
Actually nevermind that
Given any n, there exists some k where s >= 3 results in a fractional output from f(n, s)
So, for any n, all values of s before that k will result in an integer output of f(n, s). Everything after is a fraction irreducible to an integer
n and s are natural numbers
oi I don't know
Now, I am 99% sure that statement is true.
If it was false for some n, then that n would disprove the collatz conjecture haha
aha
Since this is a description I came up with to model the behavior of a number which tends towards infinity instead of 1 when placed through the rules of the CC
oooh interesting
well I don't think I could spoil it even if I tried
well, unless I found some way that kinda like invalidates the method or something maybe
=tex c(n) = \frac{n}{2} \frac{1+(-1)^n}{2}+(3n+1) \frac{1-(-1)^n}{2}
Support the bot on Patreon: https://www.patreon.com/dxsmiley
unrelated exactly but just a way to write the collatz function without piecewise since we were talking about it earlier
haha that works too, but it's kinda like what I did to make my previous solution work too
really what you've written is kind of like the version before I simplified it down
I wish I wrote that
It's by someone who created a fractal based on the collatz function:http://yozh.org/2012/01/12/the_collatz_fractal/
ahh yeah he's doing how I was working the last problem too, it's the exact same method, maybe he has more stuff about solving things with this method since you were looking for it
do you know anything about p-adic numbers?
Those are the ones like ...9999999, correct?
yeah that's -1 in the 10-adics yep
I think you might appreciate one way of thinking about them that might be sort of how you think currently
Also sidenote but my sister painted me the fractal and I thought that was awesome lol
these kinds of things come up sort of naturally when trying to solve a congruence at higher powers of the modulus
oh hey that's really cool
alright so maybe I'll try to show that one with ...99999
but it's kind of a boring example
Reminds me of
t!wiki bers slice
so let's say you want to write -1 mod 1000 as some natural number in the range [0,999]
well, it's kind of obvious that -1=999 so it's not exciting haha
but we could actually keep going to higher digits and we have -1 = ...9999 mod 10^k for all k
so the 10-adic number is just like saying, let's just make that the number itself
and now we can always "round it off" to get back any regular old congruence
more interesting examples exist though that you couldn't get normally
like for instance let's work on finding solutions to say
=tex x^2 = -1 \mod 5
so we can find some solution to this, and this corresponds to getting the first digit of a number in base 5
but this definitely won't correspond to a real number
since x^2=-1 is what we're looking at
(Sorry to interrupt... is the answer to your problem all pythagorean triples where a, b, and c are prime?)
nope
Oh I was done I think actually I guess I realized what I was going to explain some work I had done at one point
was I extended the collatz function to all 2-adic integers, then integrated the kth iteration of it over the entire set of 2-adic integers
and then took the limit as k-> infinity
I actually forget what the result was past this, since I wasn't actually interested in the collatz conjecture I just was using it to try to practice since it seemed like something I could do while learning how to integrate p-adic functions lol
but I think it would be kind of long to explain haha
"Integrating p-adic functions" sounds like a really interesting idea
I have to say, I hadn't realized the p was a variable. This is all new now
I just assumed it was a name for numbers that were "infinitely to the left"
So I'm not sure what you mean when you say p-adic functions.
And with something like x^2 = -1 being i, how is mod defined on imaginary numbers? What is the remainder of 5/i?
oh yeah there's a p-adic field for every prime
but if p isn't prime, you get a commutative ring with zero divisors
well the thing is, when you look at p-adic numbers you have to go back a step
and think of them as being something of a fork in the road
you are basically at the rational numbers, and then you can either make real and then make complex numbers
OR you can pick a prime and make p-adic numbers
so the solutions to x^2=-1 you get in the 5-adics is not the same as the solutions you get to x^2=-1 in the complex numbers
you could call it i though, as long as you understand you're in an entirely different field
the p-adics are not ordered on a number line, they're more like in a fractal structure, they can be associated to being the leaves of an infinite number tree
I guess it would help if I explained how you describe distance between p-adic numbers but
but maybe that'd be silly at the moment, I can show you how to compute digits of "i" if you're calling i to be one of the solutions to x^2=-1 in the 5-adics
so you do it one digit at a time, this is something called Hensel's lemma btw I can show you how to prove that later but the algorithm is what's useful to you
first off
x=2 will work
since 2^2 = -1 mod 5
now we add on another digit in base 5 and solve it again,
=tex (2+5a)^2 = -1 \mod 25
(I'm working in base 10 but you can see how a will be a digit in base 5 I hope)
so you square this and rearrange a bit
=tex 4 + 20a =-1 \mod 25 \ 5(1+4 a) = 0 \mod 25 \ 1+4a = 0 \mod 5 \ a= 1 \mod 5
and so here we have another digit
and so on, the lemma says you can always repeat this indefinitely, it's actually an induction argument that is proved in complete generality, supplied you can show some base case
anywho, it stands on its own as far as a method for using the chinese remainder theorem with it to boil down diophantine equations but I really rarely do that but Iw ouldn't mind trying to do this more
I guess you can then try to get the next digit in base 5, you'd have to do this btw
=tex (2+15 + b25)^2 \equiv 1 \mod 125
and then work through this to solve for b
you can see if you evaluate this mod 25 or mod 5 it collapses back down to the previous solutions
so you're never messing up your established digits
that's one thing that makes doing math in p-adics so clean, you carry to the left, while real numbers have this terrible issue where digits to the right affect those to the left
if your math only includes rational numbers, since the p-adics contain all rational numbers, you can just as well work in them instead
so back to your question if you wanted to evaluate 5/i you'd actually be able to do 5*i^{-1} since that would just be solving this same thing but starting with 3 as the first digit
actually nice thing is
well w/e I'm rambling lol
Reading that 5 times was a trip
But then it clicked
So as we continue to go up through powers of 5, we can find more and more digits for what our 5-adic i for x^2 = -1 is?
Does the number have infinite digits? Would any/all have infinite digits?
It seems like the definition is kind of forcing infinitely-sized numbers here, unless I'm misunderstanding
But I don't really see a case where you'll hit, say, 1231 and be done. Best case is something like ...00000001231, maybe?
yeah it does, and generically all p-adic numbers have "infinite digits to the left"
but they could be 0 too nothing wrong with that
yeah it does get you infinitely large numbers if you use the absolute value to measure how big your numbers are
so that's what I sorta skipped out on earlier when I decided I'd give you that concrete example just now
that fork in the road between going to real numbers means taking rational numbers and defining the absolute value you know and love
but the p-adic route means defining the absolute value in a different way
a way that's consistent with this sort of thing because it's useful to us
there is a sense in which x^2=-1 mod 5^n has a coherent solution for arbitrarily large natural number n
but this number just isn't a real number
so ok, here's how we define the absolute value for rational numbers
first write your rational number with the largest power of p factored out and relatively prime numbers a,b
=tex x = p^k \frac{a}{b}
generically speaking, k is just an integer
just meaning to say that cause it could very well be negative no problem
=tex |x|_p = \left| p^k \frac{a}{b} \right|_p = \frac{1}{p^k}
the subscript p is just to clarify, but if you're working with them normally you might just omit it cause it's just one extra thing to write and it's not that ambiguous at times
this seems kinda silly, like when I first saw this it seemed cheap, like ok you just throw away the whole number basically
but it's actually surprisingly full of structure that it makes a fractal when you use it to define distance in this very simple way
=tex d(x,y) = |x-y|_p
in fact you get a metric space outta it and then you can go on to do stuff like find the completion of this to make the p-adic numbers just like you can do it with the regular absolute value to get the real numbers
anyways it's quite strange but you have a lot of interesting properties like a stronger triangle inequality called the ultrametric inequality
it'd be good if I drew a picture of what this metric actually looked like so you can get a sense of distance
Ahh I have a lot of questions but I really need to head to bed
Could we continue another time?
sure
Also I think I got your earlier problem:
There are no triplets satisfying this. If there were, p^2 + q would have to be a prime number, but also a perfect square. This is impossible
oh why would this have to be a prime
there is at least one solution I'll say that much
let me make sure I said the problem right, I did say p^2+q=r^2 right
p^2 + q = r^2
r = sqrt(p^2 + q)
r is prime, thus sqrt(p^2 + q) is prime
And here's where I realize I was wrong and p^2 + q doesn't necessarily need to be prime. Gosh darn it```
Lol alright. Feel free to ping/dm me when you get it
Until then, have a good night. Thanks for the chat :)
yeah later
(didn't read the question properly)
Anyway, the question was
Let p(n) equal the product of the nonzero digits of n. S = p(1) + p(2) + ... + p(999). Find the largest prime factor of S
Have fun! (even though it is an aime problem, it's PRETTY easy)
cool im totally not gonna brute force through AIME solutions for it
nope
ye
I think I figured out a way to solve it in general
hmm I got 23 but I didn't really think too hard, maybe I'm wrong if the answer is supposed to be 103
my method is probably flawed
hmm I've got an interesting approach maybe
if there's a way to do something nicely
which there may very well not be
yeah on second thoughts it's going to be just as hard :^)
I was thinking consider (x-1)(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)(x-8)(x-9)
but that also doesn't work because it doesn't include any where two or more are the same
the way I did it was this, tell me where my mistake is
I defined S(n) = p(1)+p(2)+...+p(n)
then I recognized
=tex S(999) = S(99) + 1S(99) + 2S(99) + ... + 9S(99)\ = S(99) (1+910/2)
anywho this boils down to then
=tex S(999) = S(9)^3 = (1 + \frac{9*10}{2})^3 = 46^3
so that's my reasoning for 23
S(999) != S(99)+...
because 101 counts as 0 rather than the 1 it does in the first 100
so I guess it's S(999) = S(99) + (S(99)-S(9)) + (2S(99)-S(9)) + ... = 46S(99)-9S(9)?
idk
wait no
product of non-zero
I'm dumb
I'll have a think and see if I can see why this doesn't work
I left out
S(999) = S(99) + p(100) + 1S(99) + p(200) + 2S(99) + ... + p(900) + 9S(99)
I wasn't counting some points
because I was sorta assuming it had started at 0
=tex S(10^n-1) = S(10^{n-1}-1) (1+\frac{910}{2}) + \frac{910}{2}
the p function has this really nice property, p(235) = 2*p(35)
so if you imagine like S(999) being chopped up into these runs of 100 parts, specifically,
p(201)+p(202)+... + p(299) =2*[p(1)+p(2)+... + p(99)]
is one such chunk
anyways I guess I should compute my solution now that I found out I was off by 1 lol
but actually I'd like to just find the general solution as much as possible because, like, why not lol
.-. I think ur ovefconplicating it
I've already solved it and now I'm generalizing
don't you enjoy math?
join me
muwahaha

whoooo
hmm it's hard to say though how to generalize this since I was kind of thinking of doing an infinite recursion on this thing but that will end up kinda sorta diverging
well forget about p(999) if you want to generalize lmao
yeah maybe I should at least make sure it does get the right answer now
=tex S(999) = 45+46(45+46*9)
it should now
factor out the 9 and throw it away since I think 3 isn't the biggest prime factor
5 + 46*5 + 46^2
lmao
hmm is there any nice way to solve this other than to just add it
doesn't seem to be coming up to the right answer 2351 is not divisible by 103
I donโt remember but I donโt think your S(999) is right
S(99) = 45 + 45(46) = 45(47)
S(999) = 45(47) + 46(46) + 2(46^2) + 3(46^2) + ... 9(46^2)
= 45(47) + 45(46^2) = 45(47+46^2)
=pup prime factorization of 47+46^2
p(100) + p(101) + ... + p(199) = 1 + p(101) + p(102) + ... + p(199) = 1 + S(99) = 1 + 45(47) = 46^2
This was AIME 1994 #5 if anyoneโs curious
well I figured it out over dinner but I see you also figured it out :^)
it's a little bit number theory I guess
i jsut had
(my number theory is very limited so no guarantees I can actually solve this question)
for part a, i cant see how to show one direction of this iff
in particular
how to show
$$3|g(\alpha)\implies \bar{f}|\bar{g}$$
the other direction i got
at worst i can go to office hours, its nbd
but ive worked on it long enough where i should prolly just move on
oh f is the minimal polynomial of alpha, btw
i think thats just non standard notation
Hi. Let a,b be coprime positive integers, N>ab. Please how to prove there are positive x,y such that ax+by = N ?
(also sorry to interrupt you with trivial stuff)
Hmm, it'd be nice if we could conclude \overline{g}(alpha) = 0 and make some case to the effect of, \overline{f} is the minimal polynomial of alpha in F_3(alpha)?
@left blade my NT is a bit low level for your problem but if I had to guess how an argument could go, it may be along those lines. Sorry that this is probably not that helpful
Nah thatโs pretty much what I had been thinking but
No clue how to show it
No worries this is what office hours are for
@naive idol you can get a solution to ax + by = N where x and y might not be positive, and then use a seed, keep adding and subtracting by ab
So if you have a solution, then consider a(x-b) + b(y+a), or some variant thereof
You can show that this'll eventually make things positive
God I suck so much at elementary n.t. it's unbelievable
Idk man ๐ฆ Let (x,y) be any solution. Let m be smallest integer such that x + mb >= 0
For the love of god can't prove that y-ma >= 0
No idea how to use the fact that N>ab either
AH
fuck me. I'm pretty sure it's not normal for it to take so long to do
(I solved this shit btw)
I've got a question though - what books helped you become good at elementary number theory?
Uh, I dunno if I'm good but
Weil Number Theory for Beginners
It's terse but I read the first few chapters with some friends and did a bunch of problems
I got the impression that all you have to do in order to be good at elem number theory is to be smart
Nothing can help a dumb person to become good at it, no matter how many exercises he does
And that helped. This problem was there and we were sorta talking it out until we sorta figured this out. Turns out it's a generally important idea, solving diophantine equations with a seed
Uh, there's some creativity involved but I've got negative creativity tbh
You eventually learn a bag of tricks
Then again I'm still new so maybe you do need to be real creative and I'm doomed, idk
@naive idol all u need is to thoroughly understand the basics
And solve a shit ton of problems
There isnt anything like a gift here
confused on logic
apparently (PvQ) -> ~R is false if all those are true?
how can that be possble?
especially since it's the original statement. How can the original statement be false when all the variables are true?
I know that when R is true it turns to false
But the original statement says (If p or q is true, then r is false)
That's a good interpretation.
So if P and Q are true, and R is also true, then that statement is wrong.
ie, it is false.
Not sure what 3-connected means.
But a regular graph with two vertices is planar.
A regular graph with 3 vertices is also planar.
ok? how does that make the original statement able to be false?
I didn't think an original statement could be false
is r planar or not planar?
Huh how is this NT 
.>
But I don't see how it can be false if it's the statement initially given
@autumn swift note that A -> B is true if A is false as well
i know that
what happened to denmark
i was gonna tell him the answer to the problem from yesterday
@autumn swift an implication is false when the antecedent is true and the consequent is false
ie T->F
and true otherwise
@left blade hello
or am i just making some silly mistake?
um
so?
because
$$\phi(n^2) = n^2 \prod_{m=1}^{k} \left(1- \frac{1}{p_m}\right)$$

(it just seemed obvious)
๐คท
works for n=5
at least im confident now
r u tho
r u tho
we can say that
oh wait nvm
im just stupid
I was just rewriting FLT for a special case
Let $${a_n}$$ be a sequence of real numbers with $$\lim_{n \to \infty} {a_n} = L$$, and define $${b_n} = \frac{{a_1}+...+{a_n}}{n}$$ Prove that $$\lim_{n \to \infty} {b_n} = L$$
can anybody do this?
Is this number theory tho
Also look for proof sketches of Cesaro's theorem as mentioned.
$$
\forall \epsilon>0, \exists n_0\in\mathbb{N}, \forall n\geq n_0,\newline
|a_n-l| < \epsilon,\newline
\left(1-\frac{n_0-1}{n}\right)(l-\epsilon)+\frac{1}{n}\sum\limits_{k=1}^{n_0-1}a_k < \frac{1}{n}\sum\limits_{k=1}^na_k<\left(1-\frac{n_0-1}{n}\right)(l+\epsilon)+\frac{1}{n}\sum\limits_{k=1}^{n_0-1}a_k\newline
$$
By limit:
$$
l-\epsilon<\lim\limits_{n\infty}\frac{1}{n}\sum\limits_{k=1}^na_k < l + \epsilon
$$.
Nice texing my dude
"Show that the product of three consecutive numbers is divisible by 504 if the middle one is a perfect cube", I'm a bit stumped here
504 = 7 * 3^2 * 2^3 , I know that if I have n(n+1)(n+2) at least one of those is divisible by 2 and one should be divisible by 3 but that's as far as I've got
look at the possibilities for n^3 when considered mod 7, mod 9
mod 8 there's a nice trick
hm alright I'll give it a go
apparently also if (n+1) is a perfect cube then one of n(n+1)(n+2) is divisible by 7
but that's trial and error I have no idea how to show it
fermat's little theorem
also
I'd suggest writing the numbers as n^3-1, n^3 and n^3+1
ah let me see
mod 8, if n is even then n^3 is divisible by 8, otherwise one of {n^3-1,n^3+1} is divisible by 2 but not 4, and the other is divisible by 4
if we consider their product mod 7
we get n^3(n^6-1)
by fermat's little theorem, either n \equiv 0 mod 7, or n^6 \equiv 0 mod 7, and hence n^3(n^6-1) is always divisible by 7
in fact you can do a very similar thing mod 9 using euler's totient theorem
since phi(9) = 6, where phi is euler's totient function, you have
3 | n (giving 9 | n^3), or n^6 \equiv 1 (mod 9)
and hence you always have n^3(n^6-1) is divisible by 9
okay so I got the remainders, I can see the 8 trick thing
I don't follow when you say " one of {n^3-1,n^3+1} is divisible by 2 but not 4, and the other is divisible by 4"
if nยณ is divisible by 8 then nยณ is even so nยณ+1 and nยณ-1 should be odd ?
that bit is in the otherwise, as in when n is odd
oh okay
when n is even the n^3 gives you the factor of 8 so you don't need to worry about it
there's technically a way to do it all without fermat's little theorem or euler's totient theorem
oh and for 9 it works as well
yeah it's fine I know those two pretty well
thanks that made sense!
nice, that simplifies it a lot ๐
np, if you have any other number theory stuff feel free to send it my way
Well since you said so, I need to find the remainder of dividing $$\sum_{i=0}^{2p} i^{p^2 - 1}$$ by p (being p a positive prime)
now; I found out that that summatory only gives you either 1s or 0s (terms not result) (depending on whether i is coprime with p or not) so it's just a sum of 1s , howevr I couldn't find out how many 1s I'm adding
i^(p^2-1) = (i^(p+1))^(p-1) \equiv 1 (mod p) unless p | i, in which case, 0 (mod p). I'm guessing this is what you did?
yes I did fermat
so i^(p+1) is coprime with p exactly when i is, so we just have 0 for i = 0,p,2p and 1 for all other i
so the sum is the same as 2p+1-3 = 2p-2 = -2 mod p
yeah you're right
you've got 2p+1 terms and only 3 are 0s
although the python script I wrote says the value for p=11 is 4, and it should be 9 :S
maybe I wrote something wrong
wolfram says 9 so I think it's fine
So I have an excercise which says:
4x โก 2 mod 9
3x โก 5 mod 14
3x โก 1 mod 20
Find x mod 2520
I started by solving each equation in order (so for example from the first one I get x = 9k+5 so now on the second one I have 3(9k+5) โก 5 mod 14, and then on the last one I get 3(126j+91) โก 1 mod 20 which eventually gets me to x = 2520k + 2107 so x โก 2108 mod 2520.
This approach usually works but I have a bad feeling here because 9, 14 and 20 (factors of 2520) are not coprime between each other so Chinese Remainder Theorem might not quite apply and I have to check something else.
Any ideas?
Nice!
Chinese Remainder Theorem
Convert them to their prime component equations
I don't exactly remember but there was something about changing to modulo prime exponents
As long as they are co prime you can use Chinese remainder theorem
you have a mod 4 and mod 5 eqn from the third
and a mod 7 from the second
you can combine those to get mod 140
yes
then combine with mod 9 to get 1260
so I'm missing a 2 now right?
I feel there are multiple solutions here ๐ค let me see if I did something wrong
I think I've seen something similar to this once and you had to divide on two braches and solve for each one but I can't remember how
okay thanks
Ok, so I got x is congruent to 347 mod 1260
So can be either 347 or 1607 mod 2520
Let me check if those work in the original equations
Alright seems to fit
Because the given equations only guarantee that x is congruent to 347 mod 1260
yeah, we don't have a value modulo 8 to fix x
Cool then, I might not be on, but feel free to tag me, and I'll take a look
oh crap I arrived at x = 32 mod 315 ๐คฆ
so first I did mod 9, then mod 7 then mod 5
and now I have an 8 left
sooo I have to check what happens for x for each modulo 8?
Wait, you can't have an 8
you can only have a 4
you don't have an 8 to begin with
That's why you end up with 1260
oh I multiplied the 4 and the 2 idk why I thought that'd work
hmmm I got 32 mod 1260 though
oh small typo
Okay I got to 347 mod 1260
Okay I got 347 mod 2520
the case when 3x = 0 mod 2 was absurd
so it had to be 3x = 1 mod 2, then that's the only solution?
but you said that 1260 also fits?
@dusky egret
Okay I got to 347 mod 1260
Great! So now you can see that you can only confirm a solution mod 1260, so if you want a solution mod 2520, you can either have 347 or 347 + 1260, since they would both fit the criteria mod 1260.
Sorry I don't see why. I get that 1260+347 is 0 mod 1260 but I don't see why that relates to 2520 why did you decide to add those?
If you have x = 1 mod 1260, that would mean x = 1 mod 2520 is a solution
It would also mean x = 1261 mod 2520 is a solution
Since x = 1261 mod 2520 => x = 1261 + 2520*k => x = 1 mod 1260
That's basically my reasoning in this
@dusky egret the fornicating falcon has solved it
Slide in the dm's ill send u the solution
=pup 16000/11
Thanks!
=pup 22/7
are there any patterns to finding the divisibility of large integers?
like integers that are 6 or 7 digits?
Yes, there are lots of sources that talk on divisibility
It's usually looking at the last digit or the sum of the digits themselves and studying the divisibility of that
i understand the divisor rulles for integers 2 through 10
but beyond that, are there any patterns?
like factoring 6886 to find the largest prime factor
or do you literally have to divide mechanically beyond 10 to get to the quotient?
Prime factorization then just knowing the prime which satisfies that by checking divisibility of smaller primes etc. and moving up to find a supremum. Something beyond I would say is modular arithmetic properties/theorems relating to modular arithmetic
No problem
i was looking for hours today to figure this out and you solved it in 10 seconds QQ
You can probably do better than me tbh so keep going further
is it possible to have a unique minimal element that is not a least element of a set?
@sacred junco
Take (0, 1)
There is no smallest element, but it's bounded below by 0.
And is not bounded below by any number greater than 0
What would be the fastest way to take modular square root?
$$x^2 \equiv 7 \pmod{101}$$
Say, something like this
I at least know how to prove existence or lack thereof quickly enough
I think I remember reading at some point that this is a hard problem for prime moduli
Cant we assume that x =y mod 101
And then sqaure this eqn
And we can subtract the two
Just leaving y
So 0=y^2-7 mod 101
No sorry
just leaves you where you started
7-y^2
Yess.
But
If we subtract 1 from both sides
We can use wilsons theorem
So 100!=-1 mod 101
Hence y^2-8=100!
?
that's true but I don't see how it helps
please don't call me that :^)
Lol ok.
also idk how to do this quickly
Well i dont know how to do it at all
do you remember the discussion about finding the possible values for f(n) mod p?
I remember something about legrange's symbol, but that seemed slow
If anyone figures something out, please tag!
Idk how to do it without the time boundage
@blissful venturehow do u methodically solve this
I saw some c++ code that referred to the Toneli-Shanks Algorithm, but not sure what exactly it's doing.
Omg..how many theorems do u know
not many
My x^2 is coming out to be 108
Hm, I still have issues understanding this in general
Well..in this case..
The factorial of a number is equal to the nunber.
Like 100!=100..all in mod p
So if we say f(x)=x!
I summon u @wild zinc
@blissful venture whats the answer if i may ask
I don't know, that's why I asked
Does x need to be integer?
Yeah
Oh, there are no solutions for the example I gave
=latex x^2 = 13 mod 101
Yep
Ok let me step aside from modulo for a bit
Not my strong point..just got introduced to it 4 days earlier
try out x=1 to 100 :DDD
Omg..didnt come to my mind!!!
Dude the legendary mudkip is offline
Or else it wudve been sorted till now
The totient of 101 is 100
So
=latex x^ 100=1 mod 101
Yeah, obviously if I can solve for primes, I can use CRT to solve in general
But u need more than 1 relation for that
No, I meant x^2 = a mod c, where c is composite is easy when you have a solution where c is prime
Because of CRT
Ah okay
But solving for primes still seems beyond me
Dude idk..im still doing it.
Maybe it involves selectively trying some numbers
Whats the answer to this..
Yeah, I wish I understood too
https://en.wikipedia.org/wiki/Quadratic_residue#Complexity_of_finding_square_roots There is some stuff here,
and here, https://en.wikipedia.org/wiki/TonelliโShanks_algorithm
But I still don't get it
Oh no oh shit
Quadratic residue!!!
Dude there will be infinitely many solutions
Just find the first solution.
Which im doing right now.
Its basically asking all quadratic residues for mod 101
That is horribly inefficient
Thats for sure.
I'll think more tomorrow, it's late for me
Yeah sure dude.
Ill keep trying.
Wth..those wikipedia articles basically give out the full method lol
Hello all
I have a question! I have $$n, k, \ell \in \mathbb{N}$$ with $$n = 2^k \frac{2^{\ell +3} - 1}{2^{k+2} + 1}$$
I need to prove this. Last time, I had $$n = 2^k \frac{2^{\ell + 2} -1}{2^{k+2} -1}$$ which I could prove since $$ \frac{2^a - 1}{2^b - 1} = 2^{a-b} + 2^{a-2b} + 2^{a-3b} + \cdots + 2^{a-cb} + \frac{2^{a-cb} - 1}{2^b - 1}$$
However I have no such identity this time, and I'm stuck. Any help would be appreciated.
I dont understand he question
Sorry. I need to prove that $$2^k \frac{2^{\ell + 3} - 1}{2^{k+2} + 1}$$ is a natural number for some $$k, \ell \in \mathbb{N}$$
The trouble is proving that it does indeed equate to a natural number. Last time I expressed a similar rational function as a series that ended in 0, proving that it was equal to a series of powers of two - which is, of course, a natural number. The trouble is, this time I can't do that (in the same way) because the addition on the bottom is really busting my behind
Omg..busting my behind.
Thats a keeper.
So basically u need to prove that..the fraction will be an integer
Have u tried componendo dividendo?
Erm. No, because I don't believe I know what that is.
Perhaps I just call it something different. A brief demonstration, please?
I have never seen that before
Its a good problem thats for sure.
Last time I could make the following case
$$\frac{2^a - 1}{2^b - 1} = 2^{a-b} + 2^{a-2b} + \cdots + 2^{a-cb} + \frac{2^{a-cb} -1}{2^b - 1}$$
Eventually you reach the point where $$cb < a$$, and either $$a - cb = 0$$ and you're left with a series of powers of two, or you have $$0 < a-cb < b$$ in which case the fraction is a rational number. But that leaves a contradiction since we know it must equate to a natural number
So I guess what I'm asking is how to find the relationship between a and b
The trouble is this time I have $$\frac{2^a - 1}{2^b + 1}$$
And that plus on the bottom screws everything up
Well..im trying some stuff out.
Thank you
Ill let u know if something good happens
Dont thank me brother..
Im the most stupid person in the server tbh.
No sir that title has already been claimed by yours truly :p
Wait it isnt a natural no for k=1,l=1
Do i have to find solutions..
Or do i have to prove that it MUST be equal to an integer for every natural no.whatsoever
Because if its the latter case..
U already have a contradiction
There are solutions, and that fraction always equates to a natural number
I just need to find the relationship between a and b
Correct, not all combinations yield natural numbers
I need to find a relationship between those variables that generates natural numbers
And so you understand my problem ๐
What grade are u in?
Third year university
Whhaaaa...
Dude im in 10th grade. spare my tiny butt..
Ask this in the higher mathematics server..
They might be able to help u out.
Because all that comes into my mind is somehow forming a quadratic. And then use vieta jumping
You're doing pretty well for someone in 10th grade
The wot
International mathematical olympiad
The most prestigious math competition for highschool students
Ive heard that line so many times..cant live without stating it
I never went because I'm a dumbass
Alright here we go
For k=0
There are infinitely many solutions.
Now 0 aint a natural
Fuck lets go again with 1
So for every k.
There will be an infinite number of solutions...
Method coming soon
So for k=1
The denominator is 9
So the first answer is 2^6
And then u keep adding 6 on the powers..
Quite obv
This goes to infinity...hence infinite solutions.
Then for k=2
Denominator is 17
Then l=2
So for every value of k.
There are infinite solutions..
And there are infinite k
So infinite*infinite solutions..
mic drop
Anybody know if this is true? It seems extremely likely based on the growth rate of the primes but how do you prove it?
I see, ty
Yo guys I have question:
If a, b, c element of N
and
c= a + b/a - 1/b
How do you prove that c is always a square
c = (a^2 b + b^2 - a) / ab
so a divides the numerator, hence it divides b^2
b divides the numerator, so it divides a
c is supposed to be a natural number
Lets say..it leave it leaves a remainder of ab -1 when it divides b^2
And of 1 when it dividing a
a divides a evenly
yes
So we can be sure the remainder here is a
So when ab divides b^2
It must leave a remainder which when adds up with a
Leaves a multiple of ab
I'm talking about the fact that (a^2 b + b^2 - a)/a is an integer
so a divides a^2 b + b^2 - a
And thats what im trying to say isnt necessary
Alright u demonstraate ur method
Im gonna try solving it for now.
so since b | a | b^2
if for any prime p, we let a_p and b_p be the number of times p divides a and b respectively
then b_p <= a_p <= 2 b_p for all p
now if for any p, a_p < 2b_p
then p will divide a fewer times than a^2 b or b^2
so p will divide the numerator exactly a_p times
whereas it divides the denominator a_p + b_p times, so we won't get an integer
(I'm only looking at the p for which p | b)
so we must have a_p = 2b_p for all p
meaning a = b^2
and then c = b^2
@cobalt birch ur smart
thx
๐
๐
This has a very similar taste to q6 sort of.
If we swap a for b
Its still the same..
The values wont change.
@cobalt birchi didnt understand ur solution..
okay, I'll try to explain in a minute
Kk
Ok now my turn
Solve.
3x=11mod25
3x=11mod7
3x=11 mod 13
This will obv use CRT
But i cant confirm my answer so help
@cobalt birch
Wait how?
just keep adding 25,7, or 13 until you can divide by 3
well, this is the harder way
3x = 11 mod 25713
okay, good
Thanks a lot mate.
no prob!
nani
wp fine sir
a^2(b/a) + b(b/a) - 1
[(a^2+b)(b)/a]-1
ah so ur saying either b/a or (a^2+b)/a has to be an interger or else this wont be prime?
which ends up being b/a = 0 mod a
wait its 1/b
nvm i confused myself
leme reread the solution
Just transpose a from the denominator once
And b the other time
Natural times natural must be a natural number
uhuh
So u can say a|b|b^2
uhuh
What follows is understandable
tru
Not sure this is exactly number theory but in a testament to my inability to use my time wisely, I just managed to spend over two and a half hours approximating an irrational number to 28 decimal digits with a calculator
Which irrational number?
I've been thinking a little recently about the sequence f(x)=f(x-1)ยฒ+f(x-1), f(0)=1, and discovered today that double exponentials can express sequences of that type, but of course usually have irrational or transcendental values in them
so I was trying to find a such that a^(2^x) โ f(x) with that prior sequence
๐
If you're wondering, I know it is in the range 1.5979102180318731783380701182 ยฑ 10^(-28) ๐
All of that... by hand...
sometimes I just... sort of lose track of myself for a while ๐
Sounds pretty painful
actually I said that wrong before, I'm finding a such that a^(2^x)-0.5 gets arbitrarily close to f(x) as x increases - it's never exactly equal to it though
and no, not painful, just takes a while
I'm prone to obsession, you know
the sequence, btw, is something like 1, 2, 6, 42, 1806, 3263441, 10650050423922...
$$1=f(0)=a^{2^0}=a^1=a\neq 1$$.
yeah I'm using the floor of a^(2^x)
if you take the floor of it then subtract 0.5 it gets closer and closer to the sequence as you go further
you have my attention. I gotta work the basics out on paper real quick (with some excel for the number crunching^^' )
according to open office calc(which I think is lying to me), it approaches this:
$$\sqrt{2}^{(\sqrt{2}^x)}$$
this need another 2 somewhere, though
alright, this is what I got
$$\sqrt{2}^{(\sqrt{2}^{(2x+0.87)})}$$
now the behaviour of the coefficients of the recursive function is remarkable, when you expand it (at least for 0 to 4 so far):
1
1 1
1 2 2 1
1 4 8 12 9 6 3 1
1 7 32 77 178 276 342 338 282 200 122 66 30 12 4 1
maybe we should try to find the function for that and integrate it
\๐ big numbres
It's alright, this is all decently complicated stuff
I don't get some of it either lol
Can someone push me in the right direction, not sure what to do after doing extended euclidean algorithm
@celest plinth thanks, how did you get 77(59)mod 757.. I just don't understand that part. Are you just dividing each side. By 59?
no
you did that yourself
I just took both sides mod 757
all multiples of 757 get killed off
because 757 = 0 mod 757
Sorry I mean how did you get to 77 from that part?
On YouTube most people were subtracting the mod from the other number. Like 757 - 77 , to get x.
@celest plinth I guess it's if 77 was negative, we would subtract it from the negative to find a congruent answer?
@weak rapids you already calculated
1=77*59 - 6*757
I didn't do anything, I just read it off your paper
you're trying to solve:
1 = 59x (mod 757)
you have on your piece of paper
1 = 59(77) + (-6)(757)
1 (mod 757) = 59(77) + (-6)(757) (mod 757)
757 = 0 (mod 757)
so -6(757) = 0 (mod 757)
therefore
1 = 59(77) + 0 (mod 757)
1 = 59(77) (mod 757)
1 = 59(x) (mod 757)
we conclude that x=77 (mod 757)
I got 77 from your last line
oh, so I can exchange 59x and 1, flip sides I mean. Ha way over my head. I do understand when you break it down. Its just weird how 0(mod 757) is just mod(757) in this part: 1 = 59(77) + 0 (mod 757), I would think it would be 757
Can someone guide me on how to use the chinese remainder theorem to solve this. I got m = 280 and m1 = 556, m2 = 40, and m3= 35. The easiest part ha.Not sure how to go on from there.
@weak rapids id recommemd watching a video for it.
Because its quite lengthy to explain in plain text.
Or you can look at some code ๐
See, the easiest way to do CRT is like,
you know that x = 1 (mod 5)
so x = 1 + 5k
So 1 + 5k = 6 (mod 7)
so k = 1
So x = 6 (mod 35)
So x = 6 + 35k
this is so So
Yeah thats what most people do
Ayy
lmao
Oh, one of my s' was lowercase
that is the method I know for it
I swear there's a different method that's supposedly better but I might be misremembering
Naw, this is the fastest
It's different if you can calculate inverses fast
But as a human that's not as easy as solving these equations
how are you planning on solving 6 + 35k = 3 (mod 8) without calculating an inverse ๐ค
I can show you some code if you are interested ๐
These inverses are easier
But on a machine you can take bigger inverses faster
So those on average are better
do you take the inverses modulo the product of the moduli?
I've been watching videos all day ha. I can't grip what they are trying to say after that. I searched different terms "system of linear congruences" and "chinese remainder theorem" . Anything else that could help?
Yes please show some code @blissful venture
go to #computing-software because it is there
@wild zinc ok
@wild zinc When I take inverses by hand I do it like how I do gcd
yeah, extended euclidean algorithm
๐
The problem is that pow is implemented with C
So it turns out a lot faster
ok yea Extended euclidean algo is what we've been doing. I would rather do it like that
right so in python it's going to be faster ye