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.

A333245 Primes p such that the order of 2 mod p is less than the square root of p.

This page as a plain text file.
%I A333245 #18 Mar 16 2020 21:52:58
%S A333245 31,127,257,683,1103,1801,2089,2113,2351,2731,3191,4051,4513,5419,
%T A333245 6361,8191,9719,11119,11447,13367,14449,14951,20231,20857,23279,23311,
%U A333245 26317,29191,30269,32377,37171,38737,39551,43441,43691,49477,54001,55633,55871,59393
%N A333245 Primes p such that the order of 2 mod p is less than the square root of p.
%H A333245 Charles R Greathouse IV, <a href="/A333245/b333245.txt">Table of n, a(n) for n = 1..10000</a>
%e A333245 The order of 2 mod 31 is 5, and sqrt(31) = 5.56776436283..., which is more than 5, so 31 is in the sequence.
%e A333245 The order of 2 mod 37 is 36, and sqrt(37) = 6.08276253..., which is significantly less than 36, so 37 is not in the sequence.
%p A333245 q:= p-> is(numtheory[order](2, p)^2<p):
%p A333245 select(q, [ithprime(i)$i=1..10000])[];  # _Alois P. Heinz_, Mar 16 2020
%t A333245 Select[Prime[Range[6000]], MultiplicativeOrder[2, #] < Sqrt[#] &] (* _Amiram Eldar_, Mar 16 2020 *)
%o A333245 (PARI) list(lim)=my(v=List(),t,p,o); forfactored(P=30,lim\1, if(vecsum(P[2][,2])==1, t=znorder(Mod(2,p=P[1]),o); if(t^2<p, listput(v,p))); o=P); Vec(v)
%o A333245 (Julia)
%o A333245 using Nemo
%o A333245 function isA333245(n)
%o A333245     ! isprime(n) && return false
%o A333245     s, m, N = 0, 1, n
%o A333245     r = isqrt(n)
%o A333245     while true
%o A333245         k = N + m
%o A333245         v = valuation(k, 2)
%o A333245         s += v
%o A333245         s > r && return false
%o A333245         m = k >> v
%o A333245         m == 1 && break
%o A333245     end
%o A333245     return true
%o A333245 end
%o A333245 print([n for n in 3:2:60000 if isA333245(n)]) # _Peter Luschny_, Mar 16 2020
%Y A333245 Cf. A014664, A002326.
%K A333245 nonn
%O A333245 1,1
%A A333245 _Charles R Greathouse IV_, Mar 12 2020