This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A057127 #38 Mar 01 2021 12:20:01 %S A057127 1,2,3,6,9,11,17,18,19,22,27,33,34,38,41,43,51,54,57,59,66,67,73,81, %T A057127 82,83,86,89,97,99,102,107,113,114,118,121,123,129,131,134,137,139, %U A057127 146,153,162,163,166,171,177,178,179,187,193,194,198,201,209,211,214,219 %N A057127 -2 is a square mod n. %C A057127 Includes the primes in A033203 and these (primes congruent to {1, 2, 3} mod 8) are the prime factors of the terms in this sequence. %C A057127 Numbers that are not multiples of 4 and for which all odd prime factors are congruent to {1, 3} mod 8. - _Eric M. Schmidt_, Apr 21 2013 %C A057127 Positive integers primitively represented by x^2 + 2y^2. - _Ray Chandler_, Jul 22 2014 %C A057127 The set of the divisors of numbers of the form k^2+2. - _Michel Lagneau_, Jun 28 2015 %C A057127 The number of proper solutions (x, y) with nonnegative x of the positive definite primitive quadratic form x^2 + 2*y*2 (discriminant -8) representing a(n) is 1 for n = 1 and for n >= 2 it is 2^(P_1 + P_3), where P_1 and P_3 are the number of distinct prime divisors of a(n) congruent to 1 and 3 modulo 8, respectively. See the above comments on A033203 and this binary form. - _Wolfdieter Lang_, Feb 25 2021 %H A057127 Eric M. Schmidt, <a href="/A057127/b057127.txt">Table of n, a(n) for n = 1..1000</a> %H A057127 N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references) %e A057127 Binary quadratic form x^2 + 2*y^2 representing a(n), with x >= 0: a(1) = 1: one solution (x, y) = (1,0); a(2) = 2: one solution (0,1); a(3) = 3: two solutions (1, pm 1), with pm = +1 or -1; a(5) = 9 = 3^2: two solutions (1, pm 2); a(12) = 33 = 3*11: 4 solutions (1, pm 4) and (5, pm 2); a(137) = 3*11*17 = 561: eight solutions (7, pm 16), (13, pm 14), (19, pm 10) and (23, pm 4). - _Wolfdieter Lang_, Feb 25 2021 %p A057127 select(n -> numtheory:-msqrt(-2,n) <> FAIL, [$1..1000]); # _Robert Israel_, Jun 29 2015 %t A057127 Select[Range[300], IntegerQ[PowerMod[-2, 1/2, #]]&] // Quiet (* _Jean-François Alcover_, Mar 04 2019 *) %o A057127 (Sage) %o A057127 def isA057127(n): %o A057127 if n % 4 == 0: return False %o A057127 return all(p % 8 in [1, 2, 3] for p, _ in factor(n)) %o A057127 [n for n in range(1, 300) if isA057127(n)] %o A057127 # _Eric M. Schmidt_, Apr 21 2013 %o A057127 (PARI) isok(n) = issquare(Mod(-2, n)); \\ _Michel Marcus_, Jun 28 2015 %Y A057127 Cf. A008784, A033203, A057125, A057126, A057128, A057129. %K A057127 nonn %O A057127 1,2 %A A057127 _Henry Bottomley_, Aug 10 2000