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.
%I A088248 #18 Sep 11 2024 23:47:30 %S A088248 27,64,81,125,243,256,343,512,625,729,1024,1331,2187,2197,2401,3125, %T A088248 4096,4913,6561,6859,12167,14641,15625,16384,16807,19683,24389,28561, %U A088248 29791,32768,50653,59049,65536,68921,78125,79507,83521,103823,117649 %N A088248 Orders of twisted fields. %C A088248 Subset of prime powers A000961. Subset of orders of semifields A088247. %D A088248 D. E. Knuth, ``Finite Semifields and Projective Planes'' Selected Papers on Discrete Mathematics, Center for the Study of Language and Information, Leland Stanford Junior University, CA, 2003, p336. %H A088248 Chai Wah Wu, <a href="/A088248/b088248.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe) %H A088248 D. E. Knuth, <a href="http://dx.doi.org/10.1016/0021-8693(65)90018-9">Finite Semifields and Projective Planes</a>, Journal of Algebra, Volume 2, Issue 2, June 1965, Pages 182-217. %F A088248 All p^k > 16, prime p, k>=3, except 2^q, q prime. %t A088248 okQ[n_] := Module[{f, p, k}, If[n <= 16, False, f = FactorInteger[n]; If[Length[f] > 1, False, {p, k} = First[f]; k >= 3 && Not[p == 2 && PrimeQ[k]]]]]; Select[Range[10^6], okQ] (* _Jean-François Alcover_, Jul 07 2015 *) %o A088248 (Python) %o A088248 from math import isqrt %o A088248 from sympy import primerange, integer_nthroot, primepi %o A088248 def A088248(n): %o A088248 def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1))) %o A088248 def f(x): return int(n+x+primepi(x.bit_length()-1)-sum(primepi(integer_nthroot(x, k)[0]) for k in range(3, x.bit_length()))) %o A088248 def bisection(f,kmin=0,kmax=1): %o A088248 while f(kmax) > kmax: kmax <<= 1 %o A088248 while kmax-kmin > 1: %o A088248 kmid = kmax+kmin>>1 %o A088248 if f(kmid) <= kmid: %o A088248 kmax = kmid %o A088248 else: %o A088248 kmin = kmid %o A088248 return kmax %o A088248 return bisection(f,n,n) # _Chai Wah Wu_, Sep 11 2024 %Y A088248 Cf. A000961, A088247. %K A088248 easy,nonn,nice %O A088248 1,1 %A A088248 _Marc LeBrun_, Sep 25 2003