I've been looking at this question but I can't figure out any ways to approach it. This is from a first year undergraduate number theory class.
I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.
Recursive matching with regular expressions in Javascript Find and extract a number from a string How to read a file without newlines? External monitors show blank screen until restart MacBook Pro (15-inch, 2016) with 2 USB-C to HDMI adapters. The setup works great if I start up in that configuration.   If I connect the adapters while the machine is running or simply sleeping, one of the monitors will never get a signal and stay in low power mode. The OS sees the monitor, it shows in the display arrangement settings and I can move the mouse into it, but until I restart, I can't see anything on it.  Once I have restarted I can let the machine sleep or whatever, and the display still works unless I disconnect the adapter. As soon as I do that a restart is required to use it again.   Using MacOS Sierra (10.12.4)  Using this adapter: Can I open a US bank account even if I don't live in the country? prove that : $\cos x \cdot \cos(x-60^{\circ}) \cdot \cos(x+60^{\circ})= \frac14 \cos3x$ I should prove this trigonometric identity. I think I should get to this point : $\cos(3x) = 4\cos^3 x - 3\cos x $ But I don't have any idea how to do it (I tried solving $\cos(x+60^{\circ})\cos(x-60^{\circ})$ but I got nothing) How to mount read-write an ext4 partition on Windows? Error message on Terminal launch Run a GUI program at startup I am using Ubuntu 14.04. I wrote a small script named trial. The contents of the script are as follows:   #!/bin/sh SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin      sh -c firefox   I copied the script to /etc/init.d, modified permission using chmod +x trial and used update-rc.d trial defaults. The file made link but when I rebooted the machine. It did not run firefox. I tried cron @reboot but with no success. I tried rc.local too again failure. Installing an addon There is this addon that was built called Window Generator 2. It can be . However, when I go to the download link it shows up in a new tab as a bunch of code.  How can I download and use this addon in Blender? $n$ balls are thrown randomly into $k$ bins - how many are empty? A large number of variants of this question were already asked here, including these - , , which are close, but none seem to answer my question. Assume that $n$ balls are thrown randomly and independently into $k$ bins.  What is the probability of finding $x$ empty bins? What is the expectation of the number of empty bins? Word for person who looks for flattery Preserving order with LINQ I use LINQ to Objects instructions on an ordered array.  Which operations shouldn't I do to be sure the order of the array is not changed? Kernel did not upgrade between 14.04 LTS to 16.04 LTS UK visa refusal For PLAB 2 I had applied for a visit visa (business) to appear for my PLAB 2 exam on 21 June 2019. I had to attend practice classes from an academy in Manchester for which I had attached the invitation letter; my duration was 15 days to prepare my exam in a better way. I had mentioned the cost of my trip to be £1500 and my brother sponsoring me for £3000 (my entire trip).   My rejection letter stated that I was going with my mother, when I had nowhere in my form or cover letter mentioned that I am going with my mother, because I was going alone. I had shown that my brother is my financial sponsor as I didnt have enough funds in my account. I had attested all the documents of my brother but somewhere in my form I made a mistake where I wrote the total money I have is £3000, but I had only £1200 in my account. I thought we had to write the total amount, so I put my brother's sponsor money, which was supposed to be £3000; he hadn't transferred it into my account, it was in his account only.  I made one more mistake in the form where they asked how much is the cost of travel to you personally. I wrote £1500 but I think I had to write nil there.   I don't know how to proceed now. Should I transfer £3000 into my account from my brother's account and get a bank statement proving the source of income? I don't have enough money in my account despite bring employed since Nov 2018 with a salary of £700 per month, as I had to make some big transactions such as booking my PLAB 2 exam (£830£), etc.  I have already booked the exam for £830 and I don't have much time left. How can mixed content compromise an entire HTTPS session? Google Chrome is probably one of the stricter browsers out there in terms of highlighting SSL errors.  Most browsers will point out when you are viewing an HTTPS page which loads insecure images/Javascript, I understand how this is a security issue - an attacker could have modified the non-SSL content in a way which gives them access to the secure content, injected some javascript for example.  However once you have viewed an HTTPS page with mixed content, Google Chrome will continue showing you the mixed content warning (a red line through the 'https://') for as long as you stay browsing the same domain, even for subsequent pages which only include other HTTPS resources. Only once you navigate to another domain, or open a fresh tab does it tell you you're secure again.  What is the danger it's protecting you from here? How could mixed content on a previous page actually affect the security of subsequent secured pages? I understand that mixed content should be flagged up, but there must be a specific reason that Google is persisting this warning, other than "Well you still need to know about it" Should I have separate threads for rendering and logic, or even more?  I'm aware of the immense performance drop caused by data synchronization (let alone any mutex locks).  I've been thinking of taking this to the extreme and doing threads for conceivable every conceivable subsystem. But I'm worried that may slow things too. (For example, is it sane to separate the input thread from rendering or game logic threads?) Would the data synchronization required make it pointless or even slower? How to install HPLIP on my Ubuntu to support my HP printer and/or scanner? Let's assume that one has some HP printer and/or scanner and checked its support status on the corresponding page of HPLIP site - .  So one have the following information: the device Model name, Min. HPLIP Version and Driver Plug-in need.   What should one install to make Ubuntu fully support the HP printer and/or scanner? Comments can now be upvoted and flagged. How do those features work? Do users get rep for their upvoted comments? Do upvoted comments have any effect on comment sorting? And can users see their own comment upvote number somewhere?  Related:  The  about comments "Your Sites" in Android left sidebar shown in unpredictable order In the Android app, left sidebar, there is an editable list of "Your Sites". In the editing pane, the sites are re-orderable (although awkwardly), and the order one places the sites in there is preserved, even after quitting the app and returning to this pane. One expects that order to be reflected in the "Your Sites" portion of the left sidebar when the editing pane is closed, but it is not.  I'm not sure what is determining the order of the sites in the left sidebar, it doesn't seem to be by date they were "pinned" into the list one wants to show, either.