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-20 of 41 results. Next

A040028 Primes p such that x^3 = 2 has a solution mod p.

Original entry on oeis.org

2, 3, 5, 11, 17, 23, 29, 31, 41, 43, 47, 53, 59, 71, 83, 89, 101, 107, 109, 113, 127, 131, 137, 149, 157, 167, 173, 179, 191, 197, 223, 227, 229, 233, 239, 251, 257, 263, 269, 277, 281, 283, 293, 307, 311, 317, 347, 353, 359, 383, 389, 397, 401, 419, 431, 433
Offset: 1

Views

Author

Keywords

Comments

This is the union of {3}, A003627 (primes congruent to 2 mod 3) and A014752 (primes of the form x^2+27y^2). By Thm. 4.15 of [Cox], p is of the form x^2+27y^2 if and only if p is congruent to 1 mod 3 and 2 is a cubic residue mod p. If p is not congruent to 1 mod 3, then every number is a cubic residue mod p, including 2. - Andrew V. Sutherland, Apr 26 2008
Complement of A040034 relative to A000040. - Vincenzo Librandi, Sep 13 2012

References

  • David A. Cox, "Primes of the Form x^2+ny^2", 1998, John Wiley & Sons.
  • Kenneth Ireland and Michael Rosen, "A Classical Introduction to Modern Number Theory", second ed., 1990, Springer-Verlag.

Crossrefs

Cf. A001132. Number of primes p < 10^n for which 2 is a cubic residue (mod p) is in A097142.
For primes p such that x^m == 2 mod p has a solution for m = 2,3,4,5,6,7,... see A038873, A040028, A040098, A040159, A040992, A042966, ...

Programs

  • Magma
    [ p: p in PrimesUpTo(433) | exists(t){x : x in ResidueClassRing(p) | x^3 eq 2} ]; // Klaus Brockhaus, Dec 02 2008
    
  • Mathematica
    f[p_] := Block[{k = 2}, While[k < p && Mod[k^3, p] != 2, k++ ]; If[k == p, 0, 1]]; Select[ Prime[ Range[100]], f[ # ] == 1 &] (* Robert G. Wilson v, Jul 26 2004 *)
  • PARI
    select(p->ispower(Mod(2,p),3),primes(100)) \\ Charles R Greathouse IV, Apr 28 2015

Formula

a(n) ~ (3/2) n log n. - Charles R Greathouse IV, Apr 06 2022

Extensions

Typo corrected to A014752 by Paul Landon (paullandon(AT)hotmail.com), Jan 25 2010

A003629 Primes p == +- 3 (mod 8), or, primes p such that 2 is not a square mod p.

Original entry on oeis.org

3, 5, 11, 13, 19, 29, 37, 43, 53, 59, 61, 67, 83, 101, 107, 109, 131, 139, 149, 157, 163, 173, 179, 181, 197, 211, 227, 229, 251, 269, 277, 283, 293, 307, 317, 331, 347, 349, 373, 379, 389, 397, 419, 421, 443, 461, 467, 491, 499, 509, 523, 541, 547, 557, 563
Offset: 1

Views

Author

Keywords

Comments

Complement of A038873 relative to A000040.
Also primes p such that p divides 2^((p-1)/2) + 1. - Cino Hilliard, Sep 04 2004
Primes p such that p^2 == 25 (mod 48), n > 1. - Gary Detlefs, Dec 29 2011
This sequence gives the primes p which satisfy C(p, x = 0) = -1, where C(p, x) is the minimal polynomial of 2*cos(Pi/p) (see A187360). For a proof see a comment on C(n, 0) in A230075. - Wolfdieter Lang, Oct 24 2013
Except for the initial 3, these are the primes p such that Fibonacci(p) mod 6 = 5. - Gary Detlefs, May 26 2014
Inert rational primes in the field Q(sqrt(2)). - N. J. A. Sloane, Dec 26 2017
If a prime p is congruent to 3 or 5 (mod 8) and r > 1, then 2^((p-1)*p^(r-1)/2) == -1 (mod p^r). - Marina Ibrishimova, Sep 29 2018
For the proofs or the comments by Cino Hilliard and Marina Ibrishimova, see link below. - Robert Israel, Apr 24 2019

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Ronald S. Irving, Integers, Polynomials, and Rings. New York: Springer-Verlag (2004): 274.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001132 (complement from the odd primes), A007521 (subsequence), A038873, A226523.

Programs

  • Magma
    [3] cat [p: p in PrimesUpTo (600) | p^2 mod 48 eq 25]; // Vincenzo Librandi, May 23 2016
  • Maple
    for n from 2 to 563 do if(ithprime(n)^2 mod 48 = 25) then print(ithprime(n)) fi od. # Gary Detlefs, Dec 29 2011
  • Mathematica
    Select[Prime @ Range[2, 105], JacobiSymbol[2, # ] == -1 &] (* Robert G. Wilson v, Dec 15 2005 *)
    Select[Union[8Range[100] - 5, 8Range[100] - 3], PrimeQ[#] &] (* Alonso del Arte, May 22 2016 *)
    Select[Prime[Range[150]],MemberQ[{3,5},Mod[#,8]]&] (* Harvey P. Dale, Mar 02 2022 *)
  • PARI
    is(n)=isprime(n) && (n%8==3 || n%8==5) \\ Charles R Greathouse IV, Mar 21 2016
    

A040098 Primes p such that x^4 = 2 has a solution mod p.

Original entry on oeis.org

2, 7, 23, 31, 47, 71, 73, 79, 89, 103, 113, 127, 151, 167, 191, 199, 223, 233, 239, 257, 263, 271, 281, 311, 337, 353, 359, 367, 383, 431, 439, 463, 479, 487, 503, 577, 593, 599, 601, 607, 617, 631, 647, 719, 727, 743, 751, 823, 839, 863, 881, 887, 911, 919
Offset: 1

Views

Author

Keywords

Comments

For a prime p congruent to 1 mod 8, 2 is a biquadratic residue mod p if and only if there are integers x,y such that x^2 + 64*y^2 = p. 2 is also a biquadratic residue mod 2 and mod p for any prime p congruent to 7 mod 8 and for no other primes. - Fred W. Helenius (fredh(AT)ix.netcom.com), Dec 30 2004
Complement of A040100 relative to A000040. - Vincenzo Librandi, Sep 13 2012

Crossrefs

For primes p such that x^m == 2 mod p has a solution for m = 2,3,4,5,6,7,... see A038873, A040028, A040098, A040159, A040992, A042966, ...

Programs

  • Magma
    [ p: p in PrimesUpTo(919) | exists(t){x : x in ResidueClassRing(p) | x^4 eq 2} ]; // Klaus Brockhaus, Dec 02 2008
    
  • Mathematica
    ok[p_] := Reduce[ Mod[x^4 - 2, p] == 0, x, Integers] =!= False; Select[ Prime[ Range[200]], ok] (* Jean-François Alcover, Dec 14 2011 *)
  • PARI
    forprime(p=2,2000,if([]~!=polrootsmod(x^4-2,p),print1(p,", ")));print(); \\ Joerg Arndt, Jul 27 2011

A014663 Primes p such that multiplicative order of 2 modulo p is odd.

Original entry on oeis.org

7, 23, 31, 47, 71, 73, 79, 89, 103, 127, 151, 167, 191, 199, 223, 233, 239, 263, 271, 311, 337, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 601, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 881, 887, 911, 919, 937, 967, 983, 991, 1031, 1039, 1063
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Or, primes p which do not divide 2^n+1 for any n.
The possibility n=0 in the above rules out A072936(1)=2; apart from this, a(n)=A072936(n+1). - M. F. Hasler, Dec 08 2007
The order of 2 mod p is odd iff 2^k=1 mod p, where p-1=2^s*k, k odd. - M. F. Hasler, Dec 08 2007
Has density 7/24 (Hasse).
From Jianing Song, Jun 27 2025: (Start)
The multiplicative order of 2 modulo a(n) is A139686(n).
Contained in primes congruent to 1 or 7 modulo 8 (primes p such that 2 is a quadratic residue modulo p, A001132), and contains primes congruent to 7 modulo 8 (A007522). (End)

References

  • Christopher Adler and Jean-Paul Allouche (2022), Finite self-similar sequences, permutation cycles, and music composition, Journal of Mathematics and the Arts, 16:3, 244-261, DOI: 10.1080/17513472.2022.2116745.
  • P. Moree, Appendix to V. Pless et al., Cyclic Self-Dual Z_4 Codes, Finite Fields Applic., vol. 3 pp. 48-69, 1997.

Crossrefs

Cf. Complement in primes of A091317.
Cf. A001132, A007522, A040098, A045315, A049564, A139686 (the actual multiplicative orders).
Cf. Essentially the same as A072936 (except for missing leading term 2).
Cf. other bases: this sequence (base 2), A385220 (base 3), A385221 (base 4), A385192 (base 5), A163183 (base -2), A385223 (base -3), A385224 (base -4), A385225 (base -5).

Programs

  • Mathematica
    okQ[p_] := OddQ[MultiplicativeOrder[2, p]];
    Select[Prime[Range[1000]], okQ] (* Jean-François Alcover, Nov 23 2024 *)
  • PARI
    isA014663(p)=1==Mod(1,p)<<((p-1)>>factor(p-1,2)[1,2])
    listA014663(N=1000)=forprime(p=3,N,isA014663(p)&print1(p", ")) \\ M. F. Hasler, Dec 08 2007
    
  • PARI
    lista(nn) = {forprime(p=3, nn, if (znorder(Mod(2, p)) % 2, print1(p, ", ")););} \\ Michel Marcus, Feb 06 2015

Extensions

Edited by M. F. Hasler, Dec 08 2007
More terms from Max Alekseyev, Feb 06 2010

A040159 Primes p such that x^5 = 2 has a solution mod p.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 23, 29, 37, 43, 47, 53, 59, 67, 73, 79, 83, 89, 97, 103, 107, 109, 113, 127, 137, 139, 149, 151, 157, 163, 167, 173, 179, 193, 197, 199, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 277, 283, 293, 307, 313, 317, 337, 347, 349, 353
Offset: 1

Views

Author

Keywords

Crossrefs

Has same beginning as A042991 but is strictly different.
For primes p such that x^m == 2 mod p has a solution for m = 2,3,4,5,6,7,... see A038873, A040028, A040098, A040159, A040992, A042966, ...

Programs

  • Magma
    [p: p in PrimesUpTo(400) | exists{x: x in ResidueClassRing(p) | x^5 eq 2}]; // Bruno Berselli, Sep 12 2012
  • Mathematica
    ok [p_]:=Reduce[Mod[x^5- 2, p]== 0, x, Integers]=!= False; Select[Prime[Range[180]], ok] (* Vincenzo Librandi, Sep 12 2012 *)

A261246 Positive integers D such that the generalized Pell equation X^2 - D Y^2 = 2 is soluble.

Original entry on oeis.org

2, 7, 14, 23, 31, 34, 46, 47, 62, 71, 79, 94, 98, 103, 119, 127, 142, 151, 158, 167, 191, 194, 199, 206, 223, 238, 239, 254, 263, 271, 287, 302, 311, 322, 334, 343, 359, 367, 382, 383, 386, 391, 398, 431, 439, 446, 463, 478, 479, 482, 487, 503, 511
Offset: 1

Views

Author

Wolfdieter Lang, Sep 06 2015

Keywords

Comments

For the fundamental positive solution x(n)^2 - a(n)*y(n)^2 = 2 see (x(n) = A261247(n), y(n) = A261248(n)), for n >= 1.
Conjecture: The sequence consists of all numbers D not a square and even D = 2*d has odd d with prime factors of the form 1 or 7 (mod 8). Odd D has prime factors of the form 1 or 7 (mod 8) but there is an odd number of primes of the form 7 (mod 8). The following will prove that these conditions for D are necessary in order to have solutions.
This conjecture is false. For the odd D case see the counterexamples in A263010, and for the even D in A264352. - Wolfdieter Lang, Nov 12 2015
If there is a solution for D, D not a square, then only one class of solution exists due to Nagell's Theorem 110, p. 208, because then 2 divides 2*D. All solutions will be proper because 2 is a prime.
For the even prime D = p = 2 the positive fundamental solution is [x(1) = 2, y(1) = 1].
For odd primes D = p there can be solutions only for p == +7 (mod 8), that is p from A007522. Then x and y are both odd. Proof: Consider a solution of x^2 - p*y^2 = 2. The parities of x and y have to be either even and even or odd and odd. For odd x one has x^2 == +1 (mod 8) (because x^2 = 8*T(X) + 1 with x = 2*X+1 and the triangular numbers T = A000217); similarly for y^2 if y is odd. In the even-even case x^2 and y^2 are both congruent to 4 (mod 8). The even-even case leads to 4 - 4*p = 2 (mod 8), excluding all odd p, namely p == 1, 3, 5, 7 (mod 8). The odd-odd case is 1 - p*1 = 2 (mod 8), and p == 1, 3, 5 (mod 8) are excluded. Therefore, only p == 7 (mod 8) qualifies for a solution, and then x and y will be both odd.
For D = p == 7 (mod 8) from A007522 one can test if there exists a fundamental positive solution (at most one class can exist, therefore there is either no solution or just one) [2*U(p)+1, 2*V(p)+1] by checking the two inequalities (see Nagell, eq. (4) and (5), p. 206) 0 <= V(p) < floor((Y(p)/sqrt(X(p) + 1) - 1)/2) and 0 <= U(p) <= floor((sqrt(X(p) + 1) - 1)/2), with the positive fundamental solution [X(p), Y(p)] of X^2 - p*Y^2 = +1. These solutions can be found in (A033313(k), A033317(k)) if A000037(k) is the prime p == 7 (mod 8) one is testing.
For composite even D there are solutions only if D/2 is odd. Proof: If D is even then x has to be even, hence x^2 == 0 (mod 4) and then D*y^2 == -2 (mod 4), hence D cannot be 0 (mod 4). Thus an even D can only be of the form D = 2*d with d odd. The modulo 3 and modulo 5 argument used in the next case will show that d can have only prime factors of the form +1 or -1 (mod 8).
For composite odd D one finds like above that the even-even x and y case is excluded, and the odd-odd case needs D == -1 (mod 8) == 7 (mod 8). Hence a candidate for D is from A004771 - A007522. D cannot have any prime factor p of the form 3 or 5 (mod 8) because otherwise x^2 == 2 (mod p), but the Legendre symbol (2/p) = -1 for such p's (see, e.g., Nagell, Theorem 81, p. 136). For example, D = 15 = 3*5 cannot have a solution. Thus the only candidates for D have prime factors p of the form +1 or +7 (mod 8), with the number of the latter ones being odd. E.g., D = 7*17 = 119 qualifies as a candidate and it has indeed solutions, namely the ones obtainable from the fundamental one [11, 1].
The general proper positive solutions for D(n) = a(n) are obtained from the fundamental ones [x(n), y(n)] given in A261247 and A261248 with the help of powers of the matrix M(n) = [[u(n), D(n)*v(n)], [v(n), u(n)]], where u(n) and v(n) are the positive fundamental solutions of U(n) - D(n)*V(n) = 1, by (x(n; k), y(n; k))^T = M(n)^k (x(n), y(n))^T (T for transposed), for k >= 0. [u(n), v(n)] = [A033313(j(n)), A033317(j(n))] if A000037(j(n)) = D(n) = a(n).
Observation: All degrees (7, 47, 79, 103, 119, 127) of the modular equations derived for solving Ramanujan's question 699 by Galkin & Kozirev (see reference and A318732) are terms of this sequence. - Hugo Pfoertner, Sep 24 2023

Examples

			The first fundamental solutions [x(n), y(n)] are (the first entry gives D(n)=a(n)):
[2, [2, 1]], [7, [3, 1]], [14, [4, 1]],
[23, [5, 1]], [31, [39, 7]], [34, [6, 1]],
[46, [156, 23]], [47, [7, 1]], [62, [8, 1]],
[71, [59, 7]], [79, [9, 1]], [94, [1464, 151]],
[98, [10, 1]], [103, [477, 47]], [119, [11, 1]],
[127, [2175, 193]], [142, [12, 1]],
[151, [41571, 3383]], [158, [88, 7]],
[167, [13, 1]], [191, [2999, 217]],
[194, [14, 1]], [199, [127539, 9041]],
[206, [244, 17]], [223, [15, 1]], [238, [108, 7]],
[239, [2489, 161]], ...
		

References

  • J. W. S. Cassels, Rational Quadratic Forms, Cambridge, 1978; see Chap. 3.
  • V. M. Galkin, O. R. Kozyrev, On an algebraic problem of Ramanujan, pp. 89-94 in Number Theoretic And Algebraic Methods In Computer Science - Proceedings Of The International Conference, Moscow 1993, Ed. Horst G. Zimmer, World Scientific, 31 Aug 1995
  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964.

Crossrefs

See also A038873 (2 and primes == +-1 mod 8), A001132.

Programs

  • Mathematica
    Select[Range[600], False =!= Reduce[x^2 - # y^2 == 2, {x, y}, Integers] &] (* Giovanni Resta, Aug 12 2017 *)

A045315 Primes p such that x^8 = 2 has a solution mod p.

Original entry on oeis.org

2, 7, 23, 31, 47, 71, 73, 79, 89, 103, 127, 151, 167, 191, 199, 223, 233, 239, 257, 263, 271, 311, 337, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 601, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 881, 887, 911, 919, 937, 967, 983, 991, 1031, 1039
Offset: 1

Views

Author

Keywords

Comments

Coincides with the sequence of "primes p such that x^16 = 2 has a solution mod p" for first 58 terms (and then diverges).
Complement of A045316 relative to A000040. - Vincenzo Librandi, Sep 13 2012

References

  • A. Aigner, Kriterien zum 8. und 16. Potenzcharakter der Reste 2 und -2, Deutsche Math. 4 (1939), 44-52; FdM 65 - I (1939), 112.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1100) | exists(t){x : x in ResidueClassRing(p) | x^8 eq 2}]; // Vincenzo Librandi, Sep 13 2012
    
  • Mathematica
    ok[p_] := Reduce[ Mod[x^8-2, p] == 0, x, Integers] =!= False; Select[ Prime[ Range[200] ], ok] (* Jean-François Alcover, Nov 28 2011 *)
  • PARI
    is(n)=isprime(n) && ispower(Mod(2,n),8) \\ Charles R Greathouse IV, Feb 08 2017

A120681 Sum of legs of primitive Pythagorean triangles sorted first on hypotenuse, then long leg.

Original entry on oeis.org

7, 17, 23, 31, 41, 47, 49, 73, 71, 89, 79, 103, 113, 97, 119, 137, 119, 151, 127, 161, 193, 167, 161, 191, 217, 239, 217, 199, 257, 233, 263, 223, 289, 271, 311, 241, 281, 313, 329, 287, 343, 287, 329, 367, 391, 401, 353, 431, 409, 337, 383, 457, 359, 463, 479
Offset: 1

Views

Author

Lekraj Beedassy, Jun 24 2006

Keywords

Comments

The prime numbers congruent to +1 or -1 modulo 8 of this sequence appear exactly once. For a proof see the W. Lang link under A001132. - Wolfdieter Lang, Feb 17 2015

Crossrefs

Programs

  • Mathematica
    A[s_Integer] := With[{s6 = StringPadLeft[ToString[s], 6, "0"]}, Cases[ Import["https://oeis.org/A" <> s6 <> "/b" <> s6 <> ".txt", "Table"], {, }][[All, 2]]];
    A046086 = A@046086;
    A046087 = A@046087;
    a[n_] := A046087[[n]] + A046086[[n]];
    a /@ Range[10000] (* Jean-François Alcover, Mar 07 2020 *)

Formula

a(n) = A046087(n) + A046086(n).

Extensions

Edited and corrected by Ray Chandler, Apr 10 2010

A118905 Sum of legs of Pythagorean triangles (without multiple entries).

Original entry on oeis.org

7, 14, 17, 21, 23, 28, 31, 34, 35, 41, 42, 46, 47, 49, 51, 56, 62, 63, 68, 69, 70, 71, 73, 77, 79, 82, 84, 85, 89, 91, 92, 93, 94, 97, 98, 102, 103, 105, 112, 113, 115, 119, 123, 124, 126, 127, 133, 136, 137, 138, 140, 141, 142, 146, 147, 151, 153, 154, 155, 158, 161, 164, 167, 168, 170, 175, 178, 182, 184, 186, 187, 188
Offset: 1

Views

Author

Giovanni Resta, May 05 2006

Keywords

Comments

The prime numbers in this sequence define A001132 (see comment in A001132). - Richard Choulet, Dec 16 2008
For the sum of legs of Pythagorean triangles with multiple entries see A198390. - Wolfdieter Lang, May 24 2013
Are these just the positive multiples of A001132? - Charles R Greathouse IV, May 28 2013
For the sum of legs of primitive Pythagorean triangles see A120681. - Wolfdieter Lang, Feb 17 2015
n is in the sequence iff A331671(n) > 0. - Ray Chandler, Feb 26 2020

Examples

			7 = 3 + 4 and 3^2 + 4^2 = 5^2.
a(14) = 49 = 7^2 from the primitive Pythagorean triangle (x,y,z) = (9,40,41), and from the non-primitive one 7*(3,4,5); a(42) = 119 = 7*17 from four Pythagorean triangles (39,80,89) and (99,20,181) (both primitive) and 7*(5,12,13), 17*(3,4,5). - _Wolfdieter Lang_, May 24 2013
		

Crossrefs

Programs

  • Magma
    [m:m in [2..200]|#[k:k in [1..m-1]|IsSquare(k^2+(m-k)^2)] ne 0]; // Marius A. Burtea, Jul 29 2019
  • PARI
    is(n)=my(t=n^2); forstep(i=2-n%2, n-2, 2, if(issquare((t+i^2)/2), return(1))); 0 \\ Charles R Greathouse IV, May 28 2013
    

Extensions

More terms from 147 on. - Richard Choulet, Nov 24 2009
Name specified. - Wolfdieter Lang, May 24 2013

A198390 Square root of third term of a triple of squares in arithmetic progression.

Original entry on oeis.org

7, 14, 17, 21, 23, 28, 31, 34, 35, 41, 42, 46, 47, 49, 49, 51, 56, 62, 63, 68, 69, 70, 71, 73, 77, 79, 82, 84, 85, 89, 91, 92, 93, 94, 97, 98, 98, 102, 103, 105, 112, 113, 115, 119, 119, 119, 119, 123, 124, 126, 127, 133, 136, 137, 138, 140, 141, 142, 146
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 24 2011

Keywords

Comments

There is a connection to the leg sums of Pythagorean triangles.
See a comment on the primitive case under A198439, which applies mutatis mutandis. - Wolfdieter Lang, May 23 2013
Are these just the positive multiples of A001132? - Charles R Greathouse IV, May 28 2013
n appears A331671(n) times. - Ray Chandler, Feb 26 2020

Examples

			Connection to leg sums of Pythagorean triangles: a(2) = 14 because (in the notation of the Zumkeller link) (u,v,w)= (2,10,14) = 2*(1,5,7), and this corresponds to the non-primitive Pythagorean triangle 2*(x=(7-1)/1,y=(1+7)/2,z=5) = 2*(3,4,5) with leg sum 2*(3+4) = 14. - _Wolfdieter Lang_, May 23 2013
		

Crossrefs

Programs

  • Haskell
    a198390 n = a198390_list !! (n-1)
    a198390_list = map (\(,,x) -> x) ts where
       ts = [(u,v,w) | w <- [1..], v <- [1..w-1], u <- [1..v-1],
                       w^2 - v^2 == v^2 - u^2]
    
  • Mathematica
    wmax = 1000;
    triples[w_] := Reap[Module[{u, v}, For[u = 1, u < w, u++, If[IntegerQ[v = Sqrt[(u^2 + w^2)/2]], Sow[{u, v, w}]]]]][[2]];
    Flatten[DeleteCases[triples /@ Range[wmax], {}], 2][[All, 3]] (* Jean-François Alcover, Oct 20 2021 *)
  • PARI
    is(n)=my(t=n^2);forstep(i=2-n%2,n-2,2, if(issquare((t+i^2)/2), return(1))); 0 \\ Charles R Greathouse IV, May 28 2013

Formula

A198386(n) = a(n)^2.
A198441(n) = a(A198409(n)).
Previous Showing 11-20 of 41 results. Next