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 A307345 #25 Dec 06 2019 21:44:52 %S A307345 1,2,3,4,5,6,7,8,9,10,12,13,15,16,18,19,21,22,24,25,30,31,36,40,45,46, %T A307345 70,85,91,105,106,120 %N A307345 Numbers k such that every prime p <= sqrt(k) divides k*(k-1). %C A307345 If k is in the sequence, the first Chebyshev function theta(sqrt(k)) = Sum_{p <= sqrt(k)} log(p) <= 2 log(k). Now it is known that theta(x) = x + O(x/log(x)), so this can't happen if k is sufficiently large. Thus the sequence is finite. %C A307345 For x >= 2, theta(x) >= x - 1.2323*x/log(x) (see Dusart, Theorem 5.2). Thus theta(sqrt(k)) > 2*log(k) for k >= 417. Since there are no other terms < 417, the largest term is 120. %H A307345 P. Dusart, <a href="https://arxiv.org/abs/1002.0442">Estimates of Some Functions Over Primes without R.H.</a>, arXiv:1002.0442 [math.NT], 2010. %e A307345 120 is in the sequence because all primes <= sqrt(120) (namely 2,3,5,7) divide 120*119. %p A307345 Res:= NULL: %p A307345 P:= 1: %p A307345 q:= 2: t:= 4: %p A307345 for n from 1 to 10^6 do %p A307345 if n = t then P:= P*q; q:= nextprime(q); t:= q^2 fi; %p A307345 if n*(n-1) mod P = 0 then Res:= Res, n fi %p A307345 od: %p A307345 Res; %t A307345 seqQ[k_] := AllTrue[Select[Range@Floor@Sqrt@k, PrimeQ], Divisible[k (k - 1), #] &]; Select[Range[120], seqQ] (* _Amiram Eldar_, Apr 03 2019 *) %o A307345 (Sage) %o A307345 def isA307345(k): %o A307345 r = prime_range(isqrt(k)+1) %o A307345 return all([p.divides(k*(k-1)) for p in r]) %o A307345 print([n for n in (1..120) if isA307345(n)]) # _Peter Luschny_, Apr 03 2019 %o A307345 (PARI) isok(k) = forprime(p=1, sqrtint(k), if (k*(k-1) % p, return(0))); return(1); \\ _Michel Marcus_, Apr 05 2019 %Y A307345 Contains A323215. %K A307345 nonn,fini,full %O A307345 1,2 %A A307345 _Robert Israel_, Apr 03 2019