A350115
Numbers p^2*q, p
20, 52, 68, 116, 148, 164, 171, 212, 244, 292, 333, 356, 388, 404, 436, 452, 548, 596, 628, 657, 692, 724, 772, 788, 916, 932, 964, 981, 1028, 1076, 1108, 1124, 1143, 1172, 1252, 1268, 1348, 1396, 1412, 1467, 1492, 1556, 1588, 1604, 1629, 1636, 1684, 1732, 1791, 1796, 1828, 1844
Offset: 1
Keywords
Examples
20 = 2^2*5 and 2^2 divides 5-1, hence 20 is a term. 171 = 3^2*19 and 3^2 divides 19-1, hence 171 is another term.
References
- Pascal Ortiz, Exercices d'Algèbre, Collection CAPES / Agrégation, Ellipses, problème 1.35, pp. 70-74, 2004.
Programs
-
Mathematica
q[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; e == {2, 1} && Divisible[p[[2]] - 1, p[[1]]^2]]; Select[Range[2000], q] (* Amiram Eldar, Dec 14 2021 *)
-
PARI
isok(m) = {my(f=factor(m)); if (f[,2] == [2,1]~, my(p=f[1,1], q=f[2,1]); ((q-1) % p^2) == 0;);} \\ Michel Marcus, Dec 14 2021
-
Python
from sympy import integer_nthroot, isprime, primerange def aupto(limit): aset, maxp = set(), integer_nthroot(limit, 4)[0] for p in primerange(1, maxp+1): m = p**2 for t in range(m, limit//m, m): if isprime(t+1): aset.add(p**2*(t+1)) return sorted(aset) print(aupto(1844)) # Michael S. Branicky, Dec 14 2021
Extensions
More terms from Michel Marcus, Dec 14 2021
Comments