login
Primes p such that 10 is not a square mod p.
5

%I #45 May 01 2024 08:59:17

%S 7,11,17,19,23,29,47,59,61,73,97,101,103,109,113,127,131,137,139,149,

%T 167,179,181,193,211,223,229,233,251,257,263,269,313,331,337,349,353,

%U 367,379,383,389,419,421,433,457,461,463,487,491,499,503,509,541,571

%N Primes p such that 10 is not a square mod p.

%C Inert rational primes in the field Q(sqrt(10)). - _N. J. A. Sloane_, Dec 26 2017

%C Also primes p such that p divides 5^(p-1)/2 + 2^(p-1)/2. - _Cino Hilliard_, Sep 06 2004

%C All primes p such that (p^2 - 1)/24 mod 10 = {2,5}. - _Richard R. Forberg_, Aug 31 2013

%C Primes that are 7, 11, 17, 19, 21, 23, 29, or 33 mod 40. - _Charles R Greathouse IV_, Mar 18 2018

%C Primes p such that p-1 divided by the number of the digits of the period of 1/p results in an odd number. - _Davide Rotondo_, Apr 28 2024

%H Vincenzo Librandi, <a href="/A038880/b038880.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Pri#primes_decomp_of">Index to sequences related to decomposition of primes in quadratic fields</a>

%F a(n) ~ 2n log n. - _Charles R Greathouse IV_, Mar 18 2018

%t Select[ Prime@Range[2, 105], JacobiSymbol[10, # ] == -1 &] (* _Robert G. Wilson v_, Dec 15 2005 *)

%o (PARI) list(lim)=my(v=List()); forprime(p=7,lim, if(kronecker(10,p)<0, listput(v,p))); Vec(v) \\ _Charles R Greathouse IV_, Mar 18 2018

%o (Python)

%o from sympy import isprime, jacobi_symbol

%o def ok(n): return n%2 == 1 and isprime(n) and jacobi_symbol(10, n) == -1

%o print([k for k in range(575) if ok(k)]) # _Michael S. Branicky_, May 24 2022

%Y Cf. A007348.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_

%E More terms from _Robert G. Wilson v_, Dec 15 2005