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.

Previous Showing 11-14 of 14 results.

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

Original entry on oeis.org

3, 5, 6, 10, 11, 12, 13, 15, 19, 20, 21, 22, 24, 26, 27, 29, 30, 33, 35, 37, 38, 39, 40, 42, 43, 44, 45, 48, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 65, 66, 67, 69, 70, 74, 75, 76, 77, 78, 80, 83, 84, 85, 86, 87, 88, 90, 91, 93, 95, 96, 99, 101, 102, 104, 105, 106
Offset: 1

Views

Author

V. Raman, Nov 25 2013

Keywords

Comments

Numbers n such that the equation |x^2 - 2y^2| = n has no solutions in integers x,y. In other words, this sequence is the complement of A035251. - Thomas Ordowski and Altug Alkan, Feb 10 2017
It appears that this is the set of all numbers which contain at least one prime factor p congruent to 3 (mod 8) or 5 (mod 8) raised to an odd power.
With n = 3, the equation a^2 + 6*b^2 = 2*c^2 + 3*d^2 has no solutions in positive integers for a, b, c, d as the following proof shows: Let's assume that gcd(a, b, c, d) = 1, otherwise if gcd(a, b, c, d) = g, then a/g, b/g, c/g, d/g would be a smaller set of solutions to the equation. Considering modulo 3 arithmetic, we have a^2 - 2*c^2 == 0 (mod 3). Since a square is always congruent to 0 (mod 3) or 1 (mod 3), this is possible if and only if a == 0 (mod 3) and c == 0 (mod 3). Now let a = 3*p, c = 3*q, so a^2 = 9*p^2, c^2 = 9*q^2. Substituting this into the equation a^2 + 6*b^2 = 2*c^2 + 3*d^2 gives 9*p^2 + 6*b^2 = 18*q^2 + 3*d^2, i.e. 3*p^2 + 2*b^2 = 6*q^2 + d^2. Taking modulo 3 arithmetic with this equation again gives 2*b^2 - d^2 == 0 (mod 3). By using the same argument as above, this is possible if and only if b == 0 (mod 3) and d == 0 (mod 3). We already showed that a == 0 (mod 3) and c == 0 (mod 3), so gcd(a, b, c, d) should be a multiple of 3. This contradicts our assumption that gcd(a, b, c, d) = 1 and a/3, b/3, c/3, d/3 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, c, d) is (0, 0, 0, 0).
We can similarly prove for the other values of n by taking modulo n arithmetic if the only solution to a^2 - 2*d^2 == 0 (mod n) is a == 0 (mod n) and d == 0 (mod n). If r is a prime factor of n and if r^2 does not divide n and the equation a^2 - 2*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 is odd, n is a member of this sequence if and only if 2 is a quadratic non-residue (mod n). Alternately, n should have at least one prime factor congruent to 3 (mod 8) or 5 (mod 8) raised to an odd power.
If n = 2*k is even and not a multiple of 4, taking modulo 2 arithmetic yields a to be even. Putting a = 2*p, and dividing the equation by 2 gives 2*(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 twice another number that can be written by the same form x^2+k*y^2. If n is even, n is a member of this sequence if and only if n has at least one prime factor congruent to 3 (mod 8) or 5 (mod 8) raised to an odd power.
If n is a multiple of 4, then n = 4*m is a member of this sequence if and only if m is a member of this sequence.
Also numbers n such that there is no number that can be written by the form x^2+n*y^2 that is twice another number that can be written by the same form x^2+n*y^2.
Positive numbers that are not the difference between two legs of a Pythagorean right triangle. - Michael Somos, Apr 02 2017

Examples

			n = 3 is a member of this sequence because there is no positive integer m which can be simultaneously written as both x^2+6*y^2 and 2*x^2+3*y^2. The former requires the sum of {2, 3, 5, 11} mod 24 prime factors of m to be even, while the latter requires the sum of {2, 3, 5, 11} mod 24 prime factors of m to be odd.
n = 5 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 2*x^2+5*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 = 7 is not a member of this sequence because 15 = 1^2 + 14*1^2 = 2*2^2 + 7*1^2.
		

Crossrefs

Programs

  • Maple
    filter:= n -> [isolve(x^2-2*y^2=n)]=[] and [isolve(x^2-2*y^2=-n)]=[]:
    select(filter, [$1..200]); # Robert Israel, Apr 29 2020
  • PARI
    for(n=1,10000,flag=0;v=factor(n);for(i=1,matsize(v)[1],if((v[i,1]%8==3||v[i,1]%8==5)&&v[i,2]%2==1,flag=1;break));if(flag==1,print1(n", ")))
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A232531_gen(): # generator of terms
        return filter(lambda n:any((2 < p & 7 < 7) and e & 1 for p, e in factorint(n).items()),count(1))
    A232531_list = list(islice(A232531_gen(),30)) # Chai Wah Wu, Jun 28 2022

A000047 Number of integers <= 2^n of form x^2 - 2y^2.

Original entry on oeis.org

1, 2, 3, 5, 8, 15, 26, 48, 87, 161, 299, 563, 1066, 2030, 3885, 7464, 14384, 27779, 53782, 104359, 202838, 394860, 769777, 1502603, 2936519, 5744932, 11249805, 22048769, 43248623, 84894767, 166758141, 327770275, 644627310, 1268491353, 2497412741
Offset: 0

Views

Author

Keywords

Examples

			There are 5 integers <= 2^3 of form x^2 - 2y^2. The five (x,y) pairs (1,0), (2,1), (2,0), (3,1), (4,2) give respectively: 1, 2, 4, 7, 8. So a(3) = 5. - _Bernard Schott_, Feb 10 2019
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A035251.

Programs

  • Mathematica
    cnt=0; n=0; Table[n++; While[{p,e}=Transpose[FactorInteger[n]]; If[Select[p^e, MemberQ[{3,5}, Mod[ #,8]] &] == {}, cnt++ ]; n<2^k, n++ ]; cnt, {k,0,20}] (* T. D. Noe, Jan 19 2009 *)
  • PARI
    A000047(n)={ local(f,c=0); for(m=1,2^n, for(i=1,#f=factor(m)~, abs(f[1,i]%8-4)==1 || next; f[2,i]%2 & next(2));c++);c} \\ See comment in A035251: m=3 or 5 mod 8; M. F. Hasler, Jan 19 2009

Extensions

More terms from Giovanni Resta and Harry J. Smith, Jan 24 2009

A240469 Values k where the maximum number of distinct rational solutions to x^2 - Dy^2 = t, 0 < D <= k, 0 < t <= k, achieves a new record.

Original entry on oeis.org

1, 2, 7, 10, 17, 32, 73, 144, 241, 336, 360, 720, 1080, 1260
Offset: 1

Views

Author

Ralf Stephan, Apr 06 2014

Keywords

Comments

Record values are in A240470.

Examples

			All Diophantine equations x^2 - Dy^2 = t, 0 < D <= 16, 0 < t <= 16, D squarefree, have fewer than 4 distinct solutions; the first with 4 solutions is x^2 - 17y^2 = 16 with the solutions (x,y) = (9/2,1/2), (21,5), (4,0), (13,3), so 17 is in the sequence.
		

Crossrefs

Programs

  • PARI
    { r(l,k)=if(!issquarefree(l)||!polisirreducible(z^2-l),return(0));v=bnfisintnorm(bnfinit(z^2-l), k);if(!#v,return(0));s=0;for(k=1,#v,p=v[k];a=polcoeff(p,0);b=polcoeff(p,1);f=1;for(l=k+1,#v,p=v[l];aa=polcoeff(p,0);bb=polcoeff(p,1);if(abs(a)==abs(aa)&&abs(b)==abs(bb),f=0;break));s=s+f);s
    m=0;n=0;while(1,n=n+1;res=0;for(l=1,n,rr=r(l,n);if(rr>res,res=rr));for(k=1,n-1,rr=r(n,k);if(rr>res,res=rr));if(res>m,m=res;print(n,","))) }

A385449 Irregular triangle, read by rows: row n gives the pair of proper positive fundamental solutions (x, y) of the form x^2 - 2*y^2 representing -A057126(n).

Original entry on oeis.org

1, 1, 4, 3, 1, 2, 5, 4, 2, 3, 6, 5, 1, 3, 9, 7, 3, 4, 7, 6, 1, 4, 13, 10, 4, 5, 8, 7, 3, 5, 11, 9, 2, 5, 14, 11, 5, 6, 9, 8, 1, 5, 17, 13, 6, 7, 10, 9, 1, 6, 21, 16, 5, 7, 13, 11, 7, 8, 11, 10, 4, 7, 16, 13, 3, 7, 19, 15, 2, 7, 22, 17, 1, 7, 25, 19, 8, 9, 12, 11, 5, 8, 17, 14, 7, 9, 15, 13, 3, 8, 23, 18, 9, 10, 13, 12
Offset: 1

Views

Author

Wolfdieter Lang, Jul 11 2025

Keywords

Comments

The number of (x, y) pairs in row n is 1 for n = 1 and 2, and 2^P, with P = P1 + P7, where P1 and P7 are the number of prime factors 1 modulo 8 and 7 modulo 8, respectively, of A057126(n), for n >= 3.
See A057126 for comments concerning its representation by x^2 - 2*y^2.
The numbers A057126 are given by 2^e_2 * Product_{i=1..P1} p_{1,i}^e_{1,i} * Product_{j=1..P7} p_{7,j}^e_{7,j}, with the odd primes p_{1,i} and p_{7,j} congruent to 1 and 7 modulo 8, respectively. See A007519 and A007522 for these odd primes. Together with 2 these primes are given in A038873, and without 2 in A001132. The exponents are e_2 = 0 or 1, and e_{1,i} and e_{7,j} are nonnegative. The a(1) = 1 is obtained if all exponents vanish. For the proof see Lemma 18 of the linked W. Lang paper, pp. 22 - 23.
The general solutions are obtained from each fundamental solution by application of integer powers of the matrix Auto' = Mat([3,4], [2,3]). See the linked paper eq (28), p. 14, and eq. (40), p. 17 for D = 2, and k = A057126(n). For the explicit form of the powers of Auto' in terms of Chebyshev polynomials S(n, 6) = A001109(n+1) see there eq. (38), and Lemma 10, eq. (43), p. 17.
The conversion to the pair of proper solutions (X, Y) of X^2 - 2*Y^2 = A057126(n) is given by (X, Y) = (2*y - x, x - y). This may result in solutions with negative Y values. They are then transformed to the fundamental positive proper solutions via the mentioned matrix Auto'. See the right part of the example below. For this conversion see also the Nov 09 2009 comment in A035251 by Franklin T. Adams-Watters.

Examples

			n, A057126(n) /k  1  2   3  4 ...   2^P | (X, Y) = (2*y - x, x - y)
-------------------------------------------------------------------
1,  1           | 1  1               1  |  1   0 (3   2)
2,  2           | 4  3               1  |  2   1
3,  7           | 1  2,  5  4        2  |  3  -1 (5   3),  3  1
4, 14 = 2*7     | 2  3,  6  5        2  |  4  -1 (8   5),  4  1
5, 17           | 1  3,  9  7        2  |  5  -2 (7   4),  5  2
6, 23           | 3  4,  7  6        2  |  5  -1 (11  7),  5, 1
7, 31           | 1  4, 13 10        2  |  7  -3 (9   5),  7  3
8, 34 = 2*17    | 4  5,  8  7        2  |  6  -1 (14  9),  6  1
9, 41           | 3  5, 11  9        2  |  7  -2 (13  8),  7  2
10, 46 = 2*23   | 2  5, 14 11        2  |  8  -3 (12  7),  8  3
11, 47          | 5  6,  9  8        2  |  7  -1 (17 11),  7  1
12, 49 = 7^2    | 1  5, 17 13        2  |  9  -4 (11  6),  9  4
13, 62 = 2*31   | 6  7, 10  9        2  |  8  -1 (20 13),  8  1
14, 71          | 1  6, 21 16        2  | 11  -5 (13  7), 11  5
15, 73          | 5  7, 13 11        2  |  9  -2 (19 12),  9  2
16, 79          | 7  8, 11 10        2  |  9  -1 (23 15),  9  1
17, 82 = 2*41   | 4  7, 16 13        2  | 10  -3 (18 11), 10  3
18, 89          | 3  7, 19 15        2  | 11  -4 (17 10), 11  4
19, 94 = 2*47   | 2  7, 22 17        2  | 12  -5 (16  9), 12  5
20, 97          | 1  7, 25 19        2  | 13  -6 (15  8), 13  6
21, 98 = 2*7^2  | 8  9, 12 11        2  | 10  -1 (26 17), 10  1
...
The corresponding fundamental positive proper solutions of X^2 - 2*Y^2 = +119 are: [13 -5 (19 11), 13, 5] and [11 -1 (29 19), 11 1].
		

Crossrefs

Previous Showing 11-14 of 14 results.