$$ R= \left\{ n(n+1)/2 \bmod 2020: n\in\mathbb{N}  \right\} $$ It can be verified that $2\notin R$ by this Python code: list(set([n*(n+1)//2 % 2020 for n in range(1, 2020)]))  whose output is [0, 1, 3, 6, 8, 10, 13, 15, 21, 23, 25, 28, 31, 35, 36, 45, 48, 51, 53, 55, 56, 60, 61, 63, 65, 66, 70, 71, 73, 75, 78, 81, 90, 91, 95, 98, 101, 103, 105, 111, 113, 116, 118, 120, 123, 125, 126, 130, 135, 136, 138, 146, 153, 156, 161, 166, 171, 175, 176, 190, 191, 193, 196, 198, 203, 205, 206, 208, 210, 215, 221, 223, 225, 226, 230, 231, 233, 236, 238, 250, 253, 255, 258, 263, 265, 268, 273, 275, 276, 280, 283, 291, 293, 300, 303, 305, 306, 311, 313, 315, 316, 318, 320, 325, 326, 328, 331, 338, 340, 348, 351, 355, 356, 358, 363, 366, 368, 373, 376, 378, 381, 393, 395, 398, 400, 401, 405, 406, 408, 410, 416, 421, 423, 425, 426, 428, 433, 435, 438, 440, 441, 455, 456, 460, 465, 470, 475, 478, 485, 493, 495, 496, 501, 505, 506, 508, 511, 513, 515, 518, 520, 526, 528, 530, 533, 536, 540, 541, 550, 553, 556, 558, 560, 561, 565, 566, 568, 570, 571, 575, 576, 578, 580, 583, 586, 595, 596, 600, 603, 606, 608, 610, 616, 618, 621, 623, 625, 628, 630, 631, 635, 640, 641, 643, 651, 658, 661, 666, 671, 676, 680, 681, 695, 696, 698, 701, 703, 708, 710, 711, 713, 715, 720, 726, 728, 730, 731, 735, 736, 738, 741, 743, 755, 758, 760, 763, 768, 770, 773, 778, 780, 781, 785, 788, 796, 798, 805, 808, 810, 811, 816, 818, 820, 821, 823, 825, 830, 831, 833, 836, 843, 845, 853, 856, 860, 861, 863, 868, 871, 873, 878, 881, 883, 886, 898, 900, 903, 905, 906, 910, 911, 913, 915, 921, 926, 928, 930, 931, 933, 938, 940, 943, 945, 946, 960, 961, 965, 970, 975, 980, 983, 990, 998, 1000, 1001, 1006, 1010, 1011, 1013, 1016, 1018, 1020, 1023, 1025, 1031, 1033, 1035, 1038, 1041, 1045, 1046, 1055, 1058, 1061, 1063, 1065, 1066, 1070, 1071, 1073, 1075, 1076, 1080, 1081, 1083, 1085, 1088, 1091, 1100, 1101, 1105, 1108, 1111, 1113, 1115, 1121, 1123, 1126, 1128, 1130, 1133, 1135, 1136, 1140, 1145, 1146, 1148, 1156, 1163, 1166, 1171, 1176, 1181, 1185, 1186, 1200, 1201, 1203, 1206, 1208, 1213, 1215, 1216, 1218, 1220, 1225, 1231, 1233, 1235, 1236, 1240, 1241, 1243, 1246, 1248, 1260, 1263, 1265, 1268, 1273, 1275, 1278, 1283, 1285, 1286, 1290, 1293, 1301, 1303, 1310, 1313, 1315, 1316, 1321, 1323, 1325, 1326, 1328, 1330, 1335, 1336, 1338, 1341, 1348, 1350, 1358, 1361, 1365, 1366, 1368, 1373, 1376, 1378, 1383, 1386, 1388, 1391, 1403, 1405, 1408, 1410, 1411, 1415, 1416, 1418, 1420, 1426, 1431, 1433, 1435, 1436, 1438, 1443, 1445, 1448, 1450, 1451, 1465, 1466, 1470, 1475, 1480, 1485, 1488, 1495, 1503, 1505, 1506, 1511, 1515, 1516, 1518, 1521, 1523, 1525, 1528, 1530, 1536, 1538, 1540, 1543, 1546, 1550, 1551, 1560, 1563, 1566, 1568, 1570, 1571, 1575, 1576, 1578, 1580, 1581, 1585, 1586, 1588, 1590, 1593, 1596, 1605, 1606, 1610, 1613, 1616, 1618, 1620, 1626, 1628, 1631, 1633, 1635, 1638, 1640, 1641, 1645, 1650, 1651, 1653, 1661, 1668, 1671, 1676, 1681, 1686, 1690, 1691, 1705, 1706, 1708, 1711, 1713, 1718, 1720, 1721, 1723, 1725, 1730, 1736, 1738, 1740, 1741, 1745, 1746, 1748, 1751, 1753, 1765, 1768, 1770, 1773, 1778, 1780, 1783, 1788, 1790, 1791, 1795, 1798, 1806, 1808, 1815, 1818, 1820, 1821, 1826, 1828, 1830, 1831, 1833, 1835, 1840, 1841, 1843, 1846, 1853, 1855, 1863, 1866, 1870, 1871, 1873, 1878, 1881, 1883, 1888, 1891, 1893, 1896, 1908, 1910, 1913, 1915, 1916, 1920, 1921, 1923, 1925, 1931, 1936, 1938, 1940, 1941, 1943, 1948, 1950, 1953, 1955, 1956, 1970, 1971, 1975, 1980, 1985, 1990, 1993, 2000, 2008, 2010, 2011, 2016]  But an approach without brute-force calculation is expected.
106402
The sequence of triangular numbers is well known. Consider now the triangular numbers modulo some positive natural number $k$. That is, let $T_{n,k}$ be the remainder of dividing $T_n$ by $k$. For the regular sequence of triangular numbers, we can take as convention $T_n = T_{n, \infty}$.  Question: For all values of $k, i &lt; k$, does there exists some $n$ such that $T_{n, k} = i$
124091
No. of ways to choose $n$ things from $n$ alike "a" things $n$ alike "b" things and $n$ different things.  Answer is $(n+2)2^{n-1}$. But how to prove it..?
76208
So if $a &lt; b &lt; c &lt; d$ , how do I express the set $[a,b] \cup [c,d]$ as the difference of two intervals? Is it as simple as $[a,d] -[b,c]$?
68438
I want to write this:    I tried with $x_n \to_{n \to 0} 0$ but the $n \to 0$ doesn't go under the right arrow, it goes under but on the right, and I want it under but in the center, as in the picture above.
104161
I came across this formula in a list:  The number of ways of distributing $n$ identical objects among $r$ groups such that each group can have $0$ or more $(\le n)$ objects  I know that standard way of doing this is to solve the problem of distributing n identical objects and $(r-1)$ partitions among themselves which can be done in $C(n+r-1,r-1)$ ways.   But I am unable to prove to myself why it is not $(r+1)^n$.  Because each of the n objects has r+1 choices, either group1, group2,... group r or none at all.
114898
What is the next number in the following set ?  $$1,11,21,1211,111221, \ldots$$
4694
I am trying to figure out how many permutations exist in a set where none of the numbers equal their own position in the set; for example, $3,1,5,2,4$ is an acceptable permutation where $3,1,2,4,5$ is not because 5 is in position 5.  I know that the number of total permutations is $n!$. Is there a formula for how many are acceptable given the case that no position holds its own number?
42887
$$ \left\lfloor\frac{1}{\sqrt{1}} + \frac{1}{\sqrt{2}} +\dots+ \frac{1}{\sqrt{100}}\right\rfloor =\,? $$   I rationalized the denominator and then I think I should somehow group the numbers, but i don't know how.  Thanks in advance!
103593
Assume that a,b,n are all natural numbers.  I was going to set it up as:  na = q(1)*n(b) + r(1)     where a>b  and go down the chain:  nb = q2 * r(1) + (r2)  but something seems off. Someone told me that in the first part, it should be n*r(1), but I don't understand why. May I please have some direction?
52140
Encode each $n_1,n_2,n_3,...∈N^N$ by an inﬁnite sequence of 0s and 1s with inﬁnitely many 0s, and hence give a proof that $N^N$ is equinumerous with $R$.  Background: Here the set $N^N=N \times N \times N \times N \times...$ is the set of finite sequences of positive integers. Each inﬁnite sequence $n_1,n_2,n_3,...$ of positive integers gives an irrational number (with a infinite continued fraction) between 0 and 1, because each rational has a ﬁnite continued fraction. Conversely, each irrational number between 0 and 1 has a continued fraction of the above form, and hence gives an inﬁnite sequence of positive integers. Thus, we immediately have a bijection between $N^N$ and the irrational numbers in (0,1). The latter set is equinumerous with (0,1), and hence with $R$.  So far I tried to encode each n in N^N as either ones and zeros, where comas are represented as zeros. For example &lt;3,2,3,0,1> ---> 1110110111001   TIA
42042
Let $D$ be an integer such that it is not a perfect square in   $\mathbb{Z}$.       If $D \equiv 1$ mod $4$, the set $$T:= \left\{\left( \begin{matrix} a &amp; b  \\ \frac{(D-1)b}{4} &amp; a+b \\ \end{matrix} \right) : a, b \in  \mathbb{Z} \right\}$$ is a subring of $M_2(\mathbb{Z})$ which is isomorphic   to the ring $$O := \left\{a+b\frac{1+\sqrt{D}}{2}: a, b \in \mathbb{Z} \right\}.$$   My problem is to find an isomorphism. However, I find this relation : $$\det \left( \begin{matrix} a &amp; b  \\ \frac{(D-1)b}{4} &amp; a+b \\ \end{matrix} \right)$$ $$= a(a+b)-\frac{b^2(D-1)}{4}$$ $$= \left(a+b\frac{1+\sqrt{D}}{2}\right)\left(a+b\frac{1-\sqrt{D}}{2}\right)$$  and $D \equiv 1$ mod $4$ $\iff$ $\left(\frac{1+\sqrt{D}}{2}\right)\left(\frac{1-\sqrt{D}}{2}\right) = -k$ for some $k \in \mathbb{Z}$  Does someone could give me a little hint to help me complete this problem?
110140
Given a list $A$ of $n$ positive integer numbers. We're gonna play this game:  $1 -$ Take randomly $2$ numbers of $A$. $2 -$ Delete this $2$ elements of $A$. $3 -$ Insert in $A$ their gcd and lcm. $4 -$ Go to step $1.$  Prove that after some quantity of steps, $A$ doesn't change its elements.
112855
I am having difficulty understanding  :     Every non-empty set $\rm A$ contains an element $\rm B$ which is disjoint from $\rm A.$   So from my understanding if I have a set like:   $$\{1, 2, 3, 4, 5\}$$  Then one of $[1,2,3,4,5]$ is not an element in $\rm A?$ huh?
61036
Obviously the set of naturals is denoted $\mathbb{N}$, but is there a symbol for the set of odd naturals? Would $2\mathbb{N}+1$ (or $2\mathbb{N}-1$) be a standard notation?
43737
After working it out on a number line, I got: $\{4, 5, 6\}$.  As it stands, the expression contains the integers that do not belong to the set $B$ that cross into $C$. This would result in $4, 5, 6$. Number $7$ would not be included because of the soft brackets surrounding $C = (2, 7)$. Is this correct?
101103
We are given with  $$S_n=\{(x,y)|x^2+y^2=n, \text{where }x,y,n \in \mathbb Z\text{ and }n\geq0  \}$$ Now observe that $-\sqrt n\leq x\leq\sqrt n $ and similarily, $-\sqrt n\leq y\leq\sqrt n $. This means that $-\left \lfloor{\sqrt n}\right \rfloor\leq x\leq \left \lfloor{\sqrt n}\right \rfloor$ and  $-\left \lfloor{\sqrt n}\right \rfloor\leq y\leq \left \lfloor{\sqrt n}\right \rfloor$. Through this result one can easily write code and figure out the cardinality of set $S_i$ but I was wondering whether an expression can be found that would allow one to directly compute $|S_i|$.
58424
Calculate without a calculator: $$\left [ 3 \right ]^{2014^{2014}}\mod 98$$   I know I have to use Euler's Theorem. As a hint it says I might need to use the Chinese Remainder theorem too. I know how both of these work theoretically.  For example I can calculate $5^{256} \mod 13$ with Euler's Theorem. But these large numbers throw me off, especially the double power of 2014.  I started of like this for the Chinese Remainder: $$98 = 2*7^{2}\\ \left [3  \right ]^{2014^{2014}} \mod 2 \\ \left [3  \right ]^{2014^{2014}} \mod 49 \\$$  Now calculate both: $$\left [3  \right ]^{2014^{2014}\mod \phi_{(2)} = 2} \equiv  \left [3  \right ]^{0} \equiv 1  \mod 2$$ That was lucky. I fail at mod 49.  Applying Euler's Theorem on 2014^2014 (since ([3]^2014)^2014 seems even more impossible) gives the following:  $$\phi _{(49)} = 42\\ 2014 = 47*42+40\\ 2014^{2014} = 2014^{42^{47}}*2014^{40}\equiv 2014^{40} \mod 49$$  (That doesn't really work without a calculator either.) And what now, applying Euler's Theorem again doesn't work, and I can't do it in my head either.  Is my approach right? Did I do something wrong?  Please point me in the right direction. I'm also open to entirely different solutions.