cp's OEIS Frontend

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.

Showing 1-4 of 4 results.

A035251 Positive numbers of the form x^2 - 2y^2 with integers x, y.

Original entry on oeis.org

1, 2, 4, 7, 8, 9, 14, 16, 17, 18, 23, 25, 28, 31, 32, 34, 36, 41, 46, 47, 49, 50, 56, 62, 63, 64, 68, 71, 72, 73, 79, 81, 82, 89, 92, 94, 97, 98, 100, 103, 112, 113, 119, 121, 124, 126, 127, 128, 136, 137, 142, 144, 146, 151, 153, 158, 161, 162, 164, 167, 169, 175, 178
Offset: 1

Views

Author

Keywords

Comments

x^2 - 2y^2 has discriminant 8. - N. J. A. Sloane, May 30 2014
A positive number n is representable in the form x^2 - 2y^2 iff every prime p == 3 or 5 (mod 8) dividing n occurs to an even power.
Indices of nonzero terms in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s)+Kronecker(m,p)*p^(-2s))^(-1) for m=2 (A035185). [amended by Georg Fischer, Sep 03 2020]
Also positive numbers of the form 2x^2 - y^2. If x^2 - 2y^2 = n, 2(x+y)^2 - (x+2y)^2 = n. - Franklin T. Adams-Watters, Nov 09 2009
Except 2, prime numbers in this sequence have the form p=8k+-1. According to the first comment, prime factors of the forms (8k+-3),(8k+-5) occur in x^2 - 2y^2 in even powers. If x^2 - 2y^2 is a prime number, those powers must be 0. Only factors 8k+-1 remain. Example: 137=8*17+1. - Jerzy R Borysowicz, Nov 04 2015
The product of any two terms of the sequence is a term too. A proof follows from the identity: (a^2-2b^2)(c^2-2d^2) = (2bd+ac)^2 - 2(ad+bc)^2. Example: 127*175 has form x^2-2y^2, with x=9335, y=6600. - Jerzy R Borysowicz, Nov 28 2015
Primitive terms (not a product of earlier terms that are greater than 1 in the sequence) are A055673 except 1. - Charles R Greathouse IV, Sep 10 2016
Positive numbers of the form u^2 + 2uv - v^2. - Thomas Ordowski, Feb 17 2017
For integer numbers z, a, k and z^2+a^2>0, k>=0: z^(4k) + a^4 is in A035251 because z^(4k) + a^4 = (z^(2k) + a^2)^2 - 2(a*z^k)^2. Assume 0^0 = 1. Examples: 3^4 + 1^4 = 82, 3^8+4^4=6817. - Jerzy R Borysowicz, Mar 09 2017
Numbers that are the difference between two legs of a Pythagorean right triangle. - Michael Somos, Apr 02 2017

Examples

			The (x,y) pairs, with minimum x, that solve the equation are (1,0), (2,1), (2,0), (3,1), (4,2), (3,0), (4,1), (4,0), (5,2), (6,3), (5,1), (5,0), (6,2), (7,3), (8,4), (6,1), (6,0), (7,2), (8,3), (7,1), (7,0), (10,5), (8,2), ... If the positive number is a perfect square, y=0 yields a trivial solution. - _R. J. Mathar_, Sep 10 2016
		

Crossrefs

Primes: A038873.
Complement of A232531. - Thomas Ordowski and Altug Alkan, Feb 09 2017

Programs

  • Maple
    filter:= proc(n) local F;
      F:= select(t -> t[1] mod 8 = 3 or t[1] mod 8 = 5, ifactors(n)[2]);
      map(t -> t[2],F)::list(even);
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Dec 01 2015
  • Mathematica
    Reap[For[n = 1, n < 200, n++, r = Reduce[x^2 - 2 y^2 == n, {x, y}, Integers]; If[r =!= False, Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 31 2016 *)
  • PARI
    select(x -> x, direuler(p=2,201,1/(1-(kronecker(2,p)*(X-X^2))-X)), 1) \\ Fixed by Andrey Zabolotskiy, Jul 30 2020
    
  • PARI
    {a(n) = my(m, c); if( n<1, 0, c=0; m=0; while( cMichael Somos, Aug 17 2006 */
    
  • PARI
    is(n)=#bnfisintnorm(bnfinit(z^2-2),n) \\ Ralf Stephan, Oct 14 2013
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A035251_gen(): # generator of terms
        return filter(lambda n:all(not((2 < p & 7 < 7) and e & 1) for p, e in factorint(n).items()),count(1))
    A035251_list = list(islice(A035251_gen(),30)) # Chai Wah Wu, Jun 28 2022

Extensions

Better description from Sharon Sela (sharonsela(AT)hotmail.com), Mar 10 2002

A232532 Positive numbers not of the form x^2 - 3*y^2; complement of A084916.

Original entry on oeis.org

2, 3, 5, 7, 8, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 23, 26, 27, 28, 29, 30, 31, 32, 34, 35, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 50, 51, 53, 55, 56, 57, 58, 59, 60, 62, 63, 65, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 79, 80, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 95, 98, 99
Offset: 1

Views

Author

V. Raman, Nov 25 2013

Keywords

Comments

Previous name was: Numbers j such that the equation a^2 + 3*j*b^2 = 3*c^2 + j*d^2 has no solutions in positive integers for a, b, c, d.
If j is in the sequence, so is j*k^2 for any positive integer k. - Charles R Greathouse IV, Dec 13 2013

Crossrefs

Cf. A084916 (complement).

Programs

  • PARI
    for(n=1,99, if ([]==qfbsolve(Qfb(1,0,-3),n,2),print1(n,", "))); \\ Joerg Arndt, Jun 05 2022

Extensions

Six more terms from V. Raman, Dec 13 2013
Edited by and better name from Jon E. Schoenfield and Joerg Arndt, Jun 05 2022

A232681 Numbers n such that the equation a^2 + 5*n*b^2 = 5*c^2 + n*d^2 has no solutions in positive integers for a, b, c, d.

Original entry on oeis.org

2, 3, 6, 7, 8, 10, 12, 13, 14, 15, 17, 18, 21, 22, 23, 24, 26, 27, 28, 30, 32, 33, 34, 35, 37, 38, 39, 40, 42, 43, 46, 47, 48, 50, 51, 52, 53, 54, 56, 57, 58, 60, 62, 63, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 77, 78, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 96, 97, 98
Offset: 1

Views

Author

V. Raman, Nov 27 2013

Keywords

Comments

With n = 2, the equation a^2 + 10*b^2 = 2*d^2 + 5*c^2 has no solutions in positive integers for a, b, d, c as the following proof shows: Let's assume that gcd(a, b, d, c) = 1, otherwise if gcd(a, b, d, c) = g, then a/g, b/g, d/g, c/g would be a smaller set of solutions to the equation. Considering modulo 5 arithmetic, we have a^2 - 2*d^2 == 0 (mod 5). Since a square is always congruent to 0 (mod 5), 1 (mod 5) or 4 (mod 5), this is possible if and only if a == 0 (mod 5) and d == 0 (mod 5). Now let a = 5*p, d = 5*q, so a^2 = 25*p^2, d^2 = 25*q^2. Substituting this into the equation a^2 + 10*b^2 = 2*d^2 + 5*c^2 gives 25*p^2 + 10*b^2 = 50*q^2 + 5*c^2, i.e. 5*p^2 + 2*b^2 = 10*q^2 + c^2. Taking modulo 5 arithmetic with this equation again gives 2*b^2 - c^2 == 0 (mod 5). By using the same argument as above, this is possible if and only if b == 0 (mod 5) and c == 0 (mod 5). We already showed that a == 0 (mod 5) and d == 0 (mod 5), so gcd(a, b, d, c) should be a multiple of 5. This contradicts our assumption that gcd(a, b, d, c) = 1 and a/5, b/5, d/5, c/5 are a smaller set of solutions to the above mentioned equation. By using the proof of infinite descent, this implies that the only possible set of solutions to (a, b, d, c) is (0, 0, 0, 0).
We can similarly prove for the other values of n by taking modulo 5 arithmetic if the only solution to a^2 - n*d^2 == 0 (mod 5) is a == 0 (mod 5) and d == 0 (mod 5). This happens if n == 2, 3 (mod 5).
On the other hand, if we take modulo n arithmetic and if a^2 - 5*d^2 == 0 (mod n) has the only solution a == 0 (mod n) and d == 0 (mod n), then n is a member of this sequence. If r is a prime factor of n and if r^2 does not divide n and the equation a^2 - 5*d^2 == 0 (mod r) has the only solution a == 0 (mod r) and d == 0 (mod r), we can also take modulo r arithmetic to prove that n is a member of this sequence.
If n = 5*k is a multiple of 5 and not a multiple of 25, taking modulo 5 arithmetic yields 'a' to be a multiple of 5. Putting a = 5*p, and dividing the equation by 5 gives 5*(p^2+k*b^2) = (c^2+k*d^2). This equation will have no solution in positive integers p, b, c, d if and only if there is no number that can be written by the form x^2+k*y^2 that is 5 times another number that can be written by the same form x^2+k*y^2.
If n is a multiple of 25, then n = 25*m is a member of this sequence if and only if m is a member of this sequence.
This appears to be the complement of A031363. If so, the definition could be simplified. - Franklin T. Adams-Watters, Apr 02 2016
This is the complement of A031363. Proof: From the equation in the name follows a^2 - 5c^2 = n(d^2 - 5b^2). This equation has positive integer solutions if n is of the form x^2 - 5y^2, because A031363 is closed under multiplication. If there is no positive integer solution for the equation, it is because n is not a member of A031363. Thus n belongs to the present sequence, which was to be proved. This sequence contains no squares, but all odd powers of a term belong to the sequence. - Klaus Purath, Jul 31 2023

Examples

			n = 2 is a member of this sequence because there is no positive integer m which can be simultaneously written as both x^2+10*y^2 and 5*x^2+2*y^2. The former requires the sum of {2, 5, 7, 13, 23, 37} mod 40 prime factors of m to be even, while the latter requires the sum of {2, 5, 7, 13, 23, 37} mod 40 prime factors of m to be odd.
n = 3 is a member of this sequence because there is no positive integer m which can be simultaneously written as both x^2+15*y^2 and 5*x^2+3*y^2. The former requires the sum of {2, 3, 5, 8} mod 15 prime factors of m to be even, while the latter requires the sum of {2, 3, 5, 8} mod 15 prime factors of m to be odd.
		

Crossrefs

A232682 Numbers n such that the equation a^2 + 7*n*b^2 = 7*c^2 + n*d^2 has no solutions in positive integers for a, b, c, d.

Original entry on oeis.org

3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 19, 20, 22, 23, 24, 26, 27, 28, 30, 31, 33, 34, 35, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 51, 52, 54, 55, 56, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 75, 76, 77, 78, 79, 80, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 99
Offset: 1

Views

Author

V. Raman, Nov 27 2013

Keywords

Comments

With n = 3, the equation a^2 + 21*b^2 = 3*d^2 + 7*c^2 has no solutions in positive integers for a, b, d, c as the following proof shows: Let's assume that gcd(a, b, d, c) = 1, otherwise if gcd(a, b, d, c) = g, then a/g, b/g, d/g, c/g would be a smaller set of solutions to the equation. Considering modulo 7 arithmetic, we have a^2 - 3*d^2 == 0 (mod 7). Since a square is always congruent to 0 (mod 7), 1 (mod 7), 2 (mod 7) or 4 (mod 7), this is possible if and only if a == 0 (mod 7) and d == 0 (mod 7). Now let a = 7*p, d = 7*q, so a^2 = 49*p^2, d^2 = 49*q^2. Substituting this into the equation a^2 + 21*b^2 = 3*d^2 + 7*c^2 gives 49*p^2 + 21*b^2 = 147*q^2 + 7*c^2, i.e. 7*p^2 + 3*b^2 = 21*q^2 + c^2. Taking modulo 7 arithmetic with this equation again gives 3*b^2 - c^2 == 0 (mod 7). By using the same argument as above, this is possible if and only if b == 0 (mod 7) and c == 0 (mod 7). We already showed that a == 0 (mod 7) and d == 0 (mod 7), so gcd(a, b, d, c) should be a multiple of 7. This contradicts our assumption that gcd(a, b, d, c) = 1 and a/7, b/7, d/7, c/7 are a smaller set of solutions to the above mentioned equation. By using the proof of infinite descent, this implies that the only possible set of solutions to (a, b, d, c) is (0, 0, 0, 0).
We can similarly prove for the other values of n by taking modulo 7 arithmetic if the only solution to a^2 - n*d^2 == 0 (mod 7) is a == 0 (mod 7) and d == 0 (mod 7). This happens if n == 3, 5, 6 (mod 7).
On the other hand, if we take modulo n arithmetic and if a^2 - 7*d^2 == 0 (mod n) has the only solution a == 0 (mod n) and d == 0 (mod n), then n is a member of this sequence. If r is a prime factor of n and if r^2 does not divide n and the equation a^2 - 7*d^2 == 0 (mod r) has the only solution a == 0 (mod r) and d == 0 (mod r), we can also take modulo r arithmetic to prove that n is a member of this sequence.
If n = 7*k is a multiple of 7 and not a multiple of 49, taking modulo 7 arithmetic yields 'a' to be a multiple of 7. Putting a = 7*p, and dividing the equation by 7 gives 7*(p^2+k*b^2) = (c^2+k*d^2). This equation will have no solution in positive integers p, b, c, d if and only if there is no number that can be written by the form x^2+k*y^2 that is 7 times another number that can be written by the same form x^2+k*y^2.
If n is in this sequence, so is nk^2 for any positive integer k. - Charles R Greathouse IV, Dec 13 2013
If a prime p divides n and 7 is a quadratic non-residue mod p then n is not in the sequence. - Charles R Greathouse IV, Dec 13 2013

Examples

			n = 2 is not a member of this sequence because 15 = 1^2 + 14*1^2 = 7*1^2 + 2*2^2.
n = 3 is a member of this sequence because there is no positive integer m which can be simultaneously written as both x^2+21*y^2 and 7*x^2+3*y^2.
		

Crossrefs

Showing 1-4 of 4 results.