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

A002334 Least positive integer x such that prime A038873(n) = x^2 - 2y^2 for some y.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 7, 11, 9, 9, 11, 13, 11, 11, 15, 13, 13, 13, 17, 15, 19, 15, 19, 17, 21, 17, 19, 17, 17, 19, 21, 25, 19, 19, 23, 25, 23, 21, 23, 21, 21, 29, 23, 25, 23, 27, 29, 23, 31, 33, 25, 29, 27, 25, 25, 27, 29, 35, 31, 31, 27, 29, 33, 31, 29, 29, 29, 29, 37, 31, 41, 35
Offset: 1

Views

Author

Keywords

Comments

A prime p is representable in the form x^2 - 2y^2 iff p is 2 or p == 1 or 7 (mod 8). - Pab Ter (pabrlos2(AT)yahoo.com), Oct 22 2005
From Wolfdieter Lang, Feb 17 2015: (Start)
For the corresponding y terms see A002335.
a(n), together with A002335(n), gives the fundamental positive solution of the first class of this (generalized) Pell equation. The prime 2 has only one class of proper solutions. The fundamental positive solutions of the second class for the primes from A001132 are given in A254930 and A254931. (End)

Examples

			The first solutions [x(n), y(n)] are (the prime is given as first entry): [2,[2,1]], [7,[3,1]], [17,[5,2]], [23,[5,1]], [31,[7,3]], [41,[7,2]], [47,[7,1]], [71,[11,5]], [73,[9,2]], [79,[9,1]], [89,[11,4]], [97,[13,6]], [103,[11,3]], [113,[11,2]], [127,[15,7]], [137,[13,4]], [151,[13,3]], [167,[13,1]], [191,[17,7]], [193,[15,4]], [199,[19,9]], [223,[15,1]], [233,[19,8]], [239,[17,5]], [241,[21,10]], [257,[17,4]], [263,[19,7]], [271,[17,3]], ... - _Wolfdieter Lang_, Feb 17 2015
		

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • 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

Programs

  • Maple
    with(numtheory): readlib(issqr): for i from 1 to 250 do p:=ithprime(i): pmod8:=modp(p,8): if p=2 or pmod8=1 or pmod8=7 then for y from 1 do x2:=p+2*y^2: if issqr(x2) then printf("%d,",sqrt(x2)): break fi od fi od: # Pab Ter, May 08 2004
  • Mathematica
    maxPrimePi = 200;
    Reap[Do[If[MatchQ[Mod[p, 8], 1|2|7], rp = Reduce[x > 0 && y > 0 && p == x^2 - 2*y^2, {x, y}, Integers]; If[rp =!= False, xy = {x, y} /. {ToRules[rp /. C[1] -> 1]}; x0 = xy[[All, 1]] // Min // Simplify; Print[{p, xy[[1]]} ]; Sow[x0]]], {p, Prime[Range[maxPrimePi]]}]][[2, 1]] (* Jean-François Alcover, Oct 27 2019 *)

Formula

a(n)^2 - 2*A002335(n)^2 = A038873(n), n >= 1, and a(n) is the least positive integer satisfying this Pell type equation. - Wolfdieter Lang, Feb 12 2015

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 08 2004
The name has been changed in order to be more precise and to conform with A002335. The offset has been changed to 1. - Wolfdieter Lang, Feb 12 2015

A042999 Primes congruent to {2, 3, 5} (mod 8).

Original entry on oeis.org

2, 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
Offset: 1

Views

Author

Keywords

Comments

Apart from the initial term the same as A003629. - R. J. Mathar, May 23 2008

Crossrefs

Cf. A001132 (complement).

Programs

  • Magma
    [p: p in PrimesUpTo(500) | p mod 8 in [2, 3, 5]]; // Vincenzo Librandi, Aug 08 2012
  • Mathematica
    Select[Prime[Range[300]],MemberQ[{2,3,5},Mod[#,8]]&] (* Vincenzo Librandi, Aug 08 2012 *)

A049596 Primes p such that x^9 = 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, 113, 127, 131, 137, 149, 157, 167, 173, 179, 191, 197, 223, 227, 229, 233, 239, 251, 257, 263, 269, 277, 281, 283, 293, 311, 317, 347, 353, 359, 383, 389, 397, 401, 419, 431, 439, 443, 449
Offset: 1

Views

Author

Keywords

Comments

Coincides with sequence of "primes p such that x^27 = 2 has a solution mod p" for first 339 terms, then diverges.
Complement of A059262 relative to A000040. - Vincenzo Librandi, Sep 15 2012

Examples

			0^9 == 2 (mod 2). 2^9 == 2 (mod 3). 2^9 == 2 (mod 5). 6^9 == 2 (mod 11). 2^9 == 2 (mod 17). 9^9 == 2 (mod 23). 11^9 == 2 (mod 29). 16^9 == 2 (mod 31). 20^9 == 2 (mod 41). 26^9 == 2 (mod 43). - _R. J. Mathar_, Jul 20 2025
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(500) | exists(t){x : x in ResidueClassRing(p) | x^9 eq 2}]; // Vincenzo Librandi, Sep 15 2012
  • Mathematica
    ok[p_]:= Reduce[Mod[x^9 - 2, p] == 0, x, Integers] =!= False; Select[Prime[Range[100]], ok] (* Vincenzo Librandi, Sep 15 2012 *)

A115586 Prime moduli p for which 2 is neither a quadratic residue nor a primitive root.

Original entry on oeis.org

43, 109, 157, 229, 251, 277, 283, 307, 331, 397, 499, 571, 643, 683, 691, 733, 739, 811, 971, 997, 1013, 1021, 1051, 1069, 1093, 1163, 1181, 1429, 1459, 1579, 1597, 1613, 1627, 1699, 1709, 1723, 1789, 1811, 1933, 2003, 2011, 2179, 2203, 2251
Offset: 1

Views

Author

Don Reble, Mar 11 2006

Keywords

Crossrefs

Intersection of A216838 and A003629.

Programs

  • Maple
    select(p -> isprime(p) and numtheory:-order(2,p) <> p-1, [seq(seq(8*i+j,j=[3,5]),i=1..1000)]); # Robert Israel, Apr 02 2018
  • Mathematica
    Select[Prime[Range[400]], MultiplicativeOrder[2, #] != # - 1 && JacobiSymbol[2, #] == -1 &] (* Alonso del Arte, Jun 08 2014 *)
  • PARI
    is(n)=n>2&&isprime(n)&&kronecker(2,n)!=1&&znprimroot(n)!=2 \\ Lear Young, Mar 26 2014

A230077 Table a(n,m) giving in row n all k from {1, 2, ..., prime(n)-1} for which the Legendre symbol (k/prime(n)) = +1, for odd prime(n).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Oct 25 2013

Keywords

Comments

The length of row n is r(n) = (prime(n) - 1)/2, with prime(n) = A000040(n), n >= 2.
If k from {1, 2, ..., p-1} appears in row n then the Legendre symbol (k/prime(n)) = +1 otherwise it is -1.
The Legendre symbol (k/p), p an odd prime and gcd(k,p) = 1, is +1 if there exists an integer x with x^2 == k (mod p) and -1 otherwise. It is sufficient to consider k from {1, 2, ..., p-1} (gcd(0,p) = p, not 1) because (k/p) = ((k + l*p)/p) for integer l. Because (p - x)^2 == x^2 (mod p), it is also sufficient to consider only x^2 from {1^2, 2^2, ..., ((p-1)/2)^2} which are pairwise incongruent modulo p. See the Hardy-Wright reference. p. 68-69.
For odd primes p one has for the Legendre symbol ((p-1)/p) = (-1/p) = (-1)^(r(n)) (see above for the row length r(n), and theorem 82, p. 69 of Hardy-Wright), and this is +1 for prime p == 1 (mod 4) and -1 for p == 3 (mod 4). Therefore k = p-1 appears in row n iff p = prime(n) is from A002144 = 5, 13, 17, 29, 37, 41,...
For n>=4 (prime(n)>=7) at least one of the integers 2, 3, or 6 appears in every row. - Geoffrey Critzer, May 01 2015

Examples

			The irregular table a(n,m) begins (here p(n)=prime(n)):
n, p(n)\m 1 2 3  4  5  6   7   8   9  10  11  12  13  14  15
2,   3:   1
3,   5:   1 4
4,   7:   1 4 2
5,  11:   1 4 9  5  3
6,  13:   1 4 9  3 12 10
7,  17:   1 4 9 16  8  2  15  13
8,  19:   1 4 9 16  6 17  11   7   5
9,  23:   1 4 9 16  2 13   3  18  12   8   6
10, 29:   1 4 9 16 25  7  20   6  23  13   5  28  24  22
11, 31    1 4 9 16 25  5  18   2  19   7  28  20  14  10   8
...
Row n=12, p(n)=37: 1, 4, 9, 16, 25, 36, 12, 27, 7, 26, 10, 33, 21, 11, 3, 34, 30, 28.
Row n=13, p(n)=41: 1, 4, 9, 16, 25, 36, 8, 23, 40, 18, 39, 21, 5, 32, 20, 10, 2, 37, 33, 31.
(2/p) = +1 for n=4, p(4) = 7; p(7) = 17, p(9) = 23, p(11) = 31, p(13) = 41, ... This leads to A001132 (primes 1 or 7 (mod 8)).
4 = 5 - 1 appears in row n=3 for p(3)=5 because 5 is from A002144. 10 cannot appear in row 5 for p(5)=11 because 11 == 3 (mod 4), hence 11 is not in A002144.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. Fifth ed., Clarendon Press, 2003.

Crossrefs

Programs

  • Maple
    T:= n-> (p-> seq(irem(m^2, p), m=1..(p-1)/2))(ithprime(n)):
    seq(T(n), n=2..12);  # Alois P. Heinz, May 07 2015
  • Mathematica
    Table[Table[Mod[a^2, p], {a, 1, (p - 1)/2}], {p,
    Prime[Range[2, 20]]}] // Grid (* Geoffrey Critzer, Apr 30 2015 *)

Formula

a(n,m) = m^2 (mod prime(n)), n >= 2, where prime(n) = A000040(n), m = 1, 2, ..., (prime(n) - 1)/2.

A296937 Rational primes that decompose in the field Q(sqrt(13)).

Original entry on oeis.org

3, 17, 23, 29, 43, 53, 61, 79, 101, 103, 107, 113, 127, 131, 139, 157, 173, 179, 181, 191, 199, 211, 233, 251, 257, 263, 269, 277, 283, 311, 313, 337, 347, 367, 373, 389, 419, 433, 439, 443, 467, 491, 503, 521, 523, 547, 563, 569, 571, 599, 601, 607, 641
Offset: 1

Views

Author

N. J. A. Sloane, Dec 26 2017

Keywords

Comments

Is this the same sequence as A141188 or A038883? - R. J. Mathar, Jan 02 2018
From Jianing Song, Apr 21 2022: (Start)
Primes p such that Kronecker(13, p) = Kronecker(p, 13) = 1, where Kronecker() is the Kronecker symbol. That is to say, primes p that are quadratic residues modulo 13.
Primes p such that p^6 == 1 (mod 13).
Primes p == 1, 3, 4, 9, 10, 12 (mod 13). (End)

Crossrefs

Cf. A011583 (kronecker symbol modulo 13), A038883.
Rational primes that decompose in the quadratic field with discriminant D: A139513 (D=-20), A191019 (D=-19), A191018 (D=-15), A296920 (D=-11), A033200 (D=-8), A045386 (D=-7), A002144 (D=-4), A002476 (D=-3), A045468 (D=5), A001132 (D=8), A097933 (D=12), this sequence (D=13), A296938 (D=17).
Cf. A038884 (inert rational primes in the field Q(sqrt(13))).

Programs

Formula

Equals A038883 \ {13}. - Jianing Song, Apr 21 2022

A091069 Moebius mu sequence for real quadratic extension sqrt(2).

Original entry on oeis.org

1, 0, -1, 0, -1, 0, 1, 0, 0, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 0, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0
Offset: 1

Views

Author

Marc LeBrun, Dec 17 2003

Keywords

Comments

Analog of Moebius mu with sqrt(2) adjoined. Same as mu (A008683) except: 0 for even n (A005843) due to square (extended prime) factor (sqrt(2))^2 and rational primes of the form 8k+/-1 (A001132) factor into conjugate (extended prime) pairs (a + b*sqrt(2))(a - b*sqrt(2)), thus contributing +1 to the product instead of -1; e.g., 7 = (3 + sqrt(2))(3 - sqrt(2)).
For even n a(n) must be 0 because 2 is a square in the quadratic field and so the mu-analog is 0. Of course this coincidentally matches the 0's at even n in A087003. For odd n, from its definition as a product, |a(n)| MUST be the same as that of |mu(n)|. Since from the above we know that A087003(n) is the same as mu(n) at odd n, we can conclude that |a(n)| = |A087003(n)| for all n.

Examples

			a(21) = (-1)*(+1) = -1 because 21 = 3*7 where 3 and 7 are congruent to +3 and -1 mod 8 respectively.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Theorem 256, p. 221.

Crossrefs

Absolute values are the same as those of A087003.
Cf. A008683 (original Moebius function over the integers), A318608 (Moebius function over Z[sqrt(i)], also having the same absolute value as a(n)).

Programs

  • PARI
    a(n)=
    {
        my(r=1, f=factor(n));
        for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
            if(p==2||e>=2, r=0);
            if((Mod(p,8)==3||Mod(p,8)==5)&e==1, r*=-1);
        );
        return(r);
    } \\ Jianing Song, Aug 30 2018

Formula

a(n) = 0 if n even or has a square prime factor, otherwise Product_{p divides n} (2 - |p mod 8|) where the product is taken over the primes.
From Jianing Song, Aug 30 2018: (Start)
Multiplicative with a(p^e) = 0 if p = 2 or e > 1, a(p) = 1 if p == +-1 (mod 8) and -1 if p == +-3 (mod 8).
For squarefree n, a(n) = Kronecker symbol (n, 2) (or (2, n)) = A091337(n). Also for these n, a(n) = A318608(n) if n even or n == 1 (mod 8), otherwise -A318608(n).
(End)

A258149 Triangle of the absolute difference of the two legs (catheti) of primitive Pythagorean triangles.

Original entry on oeis.org

1, 0, 7, 7, 0, 17, 0, 1, 0, 31, 23, 0, 0, 0, 49, 0, 17, 0, 23, 0, 71, 47, 0, 7, 0, 41, 0, 97, 0, 41, 0, 7, 0, 0, 0, 127, 79, 0, 31, 0, 0, 0, 89, 0, 161, 0, 73, 0, 17, 0, 47, 0, 119, 0, 199, 119, 0, 0, 0, 1, 0, 73, 0, 0, 0, 241
Offset: 2

Views

Author

Wolfdieter Lang, Jun 10 2015

Keywords

Comments

For primitive Pythagorean triangles characterized by certain (n,m) pairs and references see A225949.
Here a(n,m) = 0 for non-primitive Pythagorean triangles, and for primitive Pythagorean triangles a(n,m) = abs(n^2 - m^2 - 2*n*m) = abs((n-m)^2 - 2*m^2).
The number of non-vanishing entries in row n is A055034(n).
D(n,m):= n^2 - m^2 - 2*n*m >= 0 if 1 <= m <= floor(n/(sqrt(2)+1)), and D(n,m) < 0 if n/(sqrt(2)+1)+1 <= m <= n-1, for n >= 2.
The Pell equation (n-m)^2 - 2*m^2 = +/- N is important here to find the representations of +N or -N in the triangle D(n,m). For instance, odd primes N have to be of the +1 (mod 8) (A007519) or -1 (mod 8) (A007522) form, that is, from A001132. See the Nagell reference, Theorem 110, p. 208 with Theorem 111, pp. 210-211. E.g., N = +7 appears for m = 1, 3, 9, 19, 53, ... (A077442) for n = 4, 8, 22, 46, 128, ... (2*A006452).
N = -7 appears for n = 3, 9, 19, 53, 111, ... (A077442) and m = 2, 4, 8, 22, 46, ... (2*A006452).
For the signed version 2*n*m - (n^2 - m^2) see A278717. - Wolfdieter Lang, Nov 30 2016

Examples

			The triangle a(n,m) begins:
n\m   1  2  3  4  5  6  7   8   9  10  11 ...
2:    1
3:    0  7
4:    7  0 17
5:    0  1  0 31
6:   23  0  0  0 49
7:    0 17  0 23  0 71
8:   47  0  7  0 41  0 97
9:    0 41  0  7  0  0  0 127
10:  79  0 31  0  0  0 89   0 161
11:   0 73  0 17  0 47  0 119   0 199
12: 119  0  0  0  1  0 73   0   0   0 241
...
a(2,1) = |1^2 - 2*1^2| = 1 for the primitive Pythagorean triangle (pPt) [3,4,5] with |3-4| = 1.
a(3,2) = |1^2 - 2*2^2| = 7 for the pPt [5,12,13] with |5 - 12| = 7.
a(4,1) = |3^2 - 2*1^2| = 7 for the pPt [15, 8, 17] with |15 - 8| = 7.
		

References

  • See also A225949.
  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964, pp. 208, 210-211.

Crossrefs

Programs

  • Mathematica
    a[n_, m_] /; n > m >= 1 && CoprimeQ[n, m] && (-1)^(n+m) == -1 := Abs[n^2 - m^2 - 2*n*m]; a[, ] = 0; Table[a[n, m], {n, 2, 12}, {m, 1, n-1}] // Flatten (* Jean-François Alcover, Jun 16 2015, after given formula *)

Formula

a(n,m) = abs(n^2 - m^2 -2*n*m) = abs((n-m)^2 - 2*m^2) if n > m >= 1, gcd(n,m) = 1, and n and m are integers of opposite parity (i.e., (-1)^(n+m) = -1); otherwise a(n,m) = 0.

A270951 Numbers k such that k | A000129(k-1).

Original entry on oeis.org

1, 7, 17, 23, 31, 41, 47, 71, 73, 79, 89, 97, 103, 113, 127, 137, 151, 167, 169, 191, 193, 199, 223, 233, 239, 241, 257, 263, 271, 281, 311, 313, 337, 353, 359, 367, 383, 385, 401, 409, 431, 433, 439, 449, 457, 463, 479, 487, 503, 521, 569, 577, 593, 599, 601, 607, 617, 631, 641, 647, 673, 719, 727, 743
Offset: 1

Views

Author

Altug Alkan, Mar 26 2016

Keywords

Comments

Although A246692 and this sequence have similar names, note that this sequence generates prime numbers most of the time.
Composite terms of this sequence are A351337.

Examples

			7 is a term because A000129(6) = 70 is divisible by 7.
		

Crossrefs

Cf. A000129, A001132, A246692, A270834, A351337 (composite terms).

Programs

  • Mathematica
    Select[Range[1000], Divisible[Fibonacci[#-1, 2], #]&] (* Jean-François Alcover, Jun 06 2017 *)
  • PARI
    a000129(n) = ([2, 1; 1, 0]^n)[2, 1];
    for(n=1, 1e3, if(Mod(a000129(n-1), n) == 0, print1(n, ", ")));
    
  • PARI
    is(n)=(Mod([2,1;1,0],n)^(n-1))[2,1]==0 \\ Charles R Greathouse IV, Sep 11 2022

A296938 Rational primes that decompose in the field Q(sqrt(17)).

Original entry on oeis.org

2, 13, 19, 43, 47, 53, 59, 67, 83, 89, 101, 103, 127, 137, 149, 151, 157, 179, 191, 223, 229, 239, 251, 257, 263, 271, 281, 293, 307, 331, 349, 353, 359, 373, 383, 389, 409, 421, 433, 443, 457, 461, 463, 467, 491, 509, 523, 557, 563, 569, 577, 587, 593, 599
Offset: 1

Views

Author

N. J. A. Sloane, Dec 26 2017

Keywords

Comments

From Jianing Song, Apr 21 2022: (Start)
Primes p such that kronecker(17, p) = kronecker(p, 17) = 1, where kronecker() is the kronecker symbol. That is to say, primes p that are quadratic residues modulo 17.
Primes p such that p^8 == 1 (mod 17).
Primes p == 1, 2, 4, 8, 9, 13, 15, 16 (mod 17). (End)

Crossrefs

Cf. A011584 (kronecker symbol modulo 17).
Rational primes that decompose in the quadratic field with discriminant D: A139513 (D=-20), A191019 (D=-19), A191018 (D=-15), A296920 (D=-11), A033200 (D=-8), A045386 (D=-7), A002144 (D=-4), A002476 (D=-3), A045468 (D=5), A001132 (D=8), A097933 (D=12), A296937 (D=13), this sequence (D=17).
Cf. A038890 (inert rational primes in the field Q(sqrt(17))).

Programs

Previous Showing 21-30 of 41 results. Next