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.

Showing 1-10 of 20 results. Next

A054397 Numbers m such that there are precisely 5 groups of order m.

Original entry on oeis.org

8, 12, 18, 20, 27, 50, 52, 68, 98, 116, 125, 135, 148, 164, 171, 212, 242, 244, 273, 292, 297, 333, 338, 343, 356, 388, 399, 404, 436, 452, 459, 548, 578, 596, 621, 628, 651, 657, 692, 722, 724, 741, 772, 777, 783, 788, 825, 855, 875, 916, 932, 964, 981
Offset: 1

Views

Author

N. J. A. Sloane, May 21 2000

Keywords

Comments

For m = 2*p^2 (p prime), there are precisely 5 groups of order m, so A079704 and A143928 (p odd prime) are two subsequences. - Bernard Schott, Dec 10 2021
For m = p^3, p prime, there are also 5 groups of order m, so A030078, where these groups are described, is another subsequence. - Bernard Schott, Dec 11 2021
For m squarefree, there are 5 groups of order m if and only if all of the following hold: 3|m, there are exactly two prime factors p,q of m such that p,q = 1 mod 3, no other relations of the form p' = 1 mod q' hold for p',q' prime factors of m. - Robin Jones, May 27 2025

Examples

			For m = 8, the 5 groups of order 8 are C8, C4 x C2, D8, Q8, C2 x C2 x C2 and for m = 12 the 5 groups of order 12 are C3 : C4, C12, A4, D12, C6 x C2 where C, D, Q  mean cyclic, dihedral, quaternion groups of the stated order and A is the alternating group of the stated degree. The symbols x and : mean direct and semidirect products respectively. - _Muniru A Asiru_, Nov 03 2017
		

Crossrefs

Cf. A000001. Cyclic numbers A003277. Numbers m such that there are precisely k groups of order m: A054395 (k=2), A055561 (k=3), A054396 (k=4), this sequence (k=5), A135850 (k=6), A249550 (k=7), A249551 (k=8), A249552 (k=9), A249553 (k=10), A249554 (k=11), A249555 (k=12), A292896 (k=13), A294155 (k=14), A294156 (k=15), A295161 (k=16), A294949 (k=17), A298909 (k=18), A298910 (k=19), A298911 (k=20).
Cf. A384370 (squarefree numbers in this sequence).

Programs

  • GAP
    A054397 := Filtered([1..2015], n -> NumberSmallGroups(n) = 5); # Muniru A Asiru, Nov 03 2017
  • Mathematica
    Select[Range[10^4], FiniteGroupCount[#] == 5 &] (* Robert Price, May 23 2019 *)

Formula

Sequence is { k | A000001(k) = 5 }. - Muniru A Asiru, Nov 03 2017

Extensions

More terms from Christian G. Bower, May 25 2000

A247687 Numbers m with the property that the symmetric representation of sigma(m) has three parts of width one.

Original entry on oeis.org

9, 25, 49, 50, 98, 121, 169, 242, 289, 338, 361, 484, 529, 578, 676, 722, 841, 961, 1058, 1156, 1369, 1444, 1681, 1682, 1849, 1922, 2116, 2209, 2312, 2738, 2809, 2888, 3362, 3364, 3481, 3698, 3721, 3844, 4232, 4418, 4489, 5041, 5329, 5476, 5618, 6241, 6724, 6728, 6889, 6962, 7396, 7442, 7688, 7921, 8836, 8978, 9409
Offset: 1

Views

Author

Hartmut F. W. Hoft, Sep 22 2014

Keywords

Comments

The symmetric representation of sigma(m) has 3 regions of width 1 where the two extremal regions each have 2^k - 1 legs and the central region starts with the p-th leg of the associated Dyck path for sigma(m) precisely when m = 2^(k - 1) * p^2 where 2^k < p <= row(m), k >= 1, p >= 3 is prime and row(m) = floor((sqrt(8*m + 1) - 1)/2). Furthermore, the areas of the two outer regions are (2^k - 1)*(p^2 + 1)/2 each so that the area of the central region is (2^k - 1)*p; for a proof see the link.
Since the sequence is defined by a two-parameter expression it can be written naturally as a triangle as shown in the Example section.
A263951 is a subsequence of this sequence containing the squares of all those primes p for which the areas of the 3 regions in the symmetric representation of p^2 (p once and (p^2 + 1)/2 twice) are primes; i.e., p^2 and p^2 + 1 are semiprimes (see A070552). - Hartmut F. W. Hoft, Aug 06 2020

Examples

			We show portions of the first eight columns, powers of two 0 <= k <= 7, and 55 rows of the triangle through prime(56) = 263.
p/k     0       1       2       3       4       5       6       7
3       9
5       25      50
7       49      98
11      121     242     484
13      169     338     676
17      289     578     1156    2312
19      361     722     1444    2888
23      529     1058    2116    4232
29      841     1682    3364    6728
31      961     1922    3844    7688
37      1369    2738    5476    10952   21904
41      1681    3362    6724    13448   26896
43      1849    3698    7396    14792   29584
47      2209    4418    8836    17672   35344
53      2809    5618    11236   22472   44944
59      3481    6962    13924   27848   55696
61      3721    7442    14884   29768   59536
67      4489    8978    17956   35912   71824   143648
71      5041    10082   20164   40328   80656   161312
.       .       .       .       .       .       .
.       .       .       .       .       .       .
131     17161   34322   68644   137288  274567  549152  1098304
137     18769   37538   75076   150152  300304  600608  1201216
.       .       .       .       .       .       .       .
.       .       .       .       .       .       .       .
257     66049   132098  264196  528392  1056784 2113568 4227136 8454272
263     69169   138338  276676  553352  1106704 2213408 4426816 8853632
Number 4 is not in this sequence since the symmetric representation of sigma(4) consists of a single region. Column k=0 contains the squares of primes (A001248(n), n>=2), column k=1 contains double the squares of primes (A079704(n), n>=2) and column k=2 contains four times the squares of primes (A069262(n), n>=5).
		

Crossrefs

Programs

  • Mathematica
    (* path[n] and a237270[n] are defined in A237270 *)
    atmostOneDiagonalsQ[n_] := SubsetQ[{0, 1}, Union[Flatten[Drop[Drop[path[n], 1], -1] - path[n-1], 1]]]
    (* data *)
    Select[Range[10000], atmostOneDiagonalsQ[#] && Length[a237270[#]]==3 &]
    (* expression for the triangle in the Example section *)
    TableForm[Table[2^k Prime[n]^2, {n, 2, 57}, {k, 0, Floor[Log[2, Prime[n]] - 1]}], TableDepth -> 2, TableHeadings -> {Map[Prime, Range[2, 57]], Range[0, Floor[Log[2, Prime[57] - 1]]]}]

Formula

As an irregular triangle, T(n, k) = 2^k * prime(n)^2 where n >= 2 and 0 <= k <= floor(log_2(prime(n)) - 1).

A143928 2*p^2, for p an odd prime.

Original entry on oeis.org

18, 50, 98, 242, 338, 578, 722, 1058, 1682, 1922, 2738, 3362, 3698, 4418, 5618, 6962, 7442, 8978, 10082, 10658, 12482, 13778, 15842, 18818, 20402, 21218, 22898, 23762, 25538, 32258, 34322, 37538, 38642, 44402, 45602, 49298, 53138, 55778, 59858
Offset: 1

Views

Author

Jonathan Vos Post, Sep 05 2008

Keywords

Comments

For these numbers m, there are precisely 5 groups of order m, hence it is a subsequence of A054397. The 5 groups are C_{2*p^2}, C_2 X (C_p X C_p), C_p^2 : C_2 ~ D_{2*p^2}, and two non-isomorphic groups (C_p X C_p) : C_2, where C, D mean cyclic, dihedral groups of the stated order; the symbols ~, X and : mean isomorphic to, direct and semidirect products respectively. - Bernard Schott, Dec 10 2021

Examples

			a(1) = 2*A065091(1)^2 = 2*3^2 = 18.
a(2) = 2*A065091(2)^2 = 2*5^2 = 50.
a(3) = 2*A065091(3)^2 = 2*7^2 = 98.
		

References

  • Pascal Ortiz, Exercices d'Algèbre, Collection CAPES / Agrégation, Ellipses, problème 1.35, pp. 70-74, 2004.

Crossrefs

Subsequence of A079704.

Programs

  • Mathematica
    2#^2&/@Prime[Range[2,40]] (* Harvey P. Dale, Jul 23 2021 *)
  • Python
    from sympy import prime
    def a(n): return 2*prime(n+1)**2
    print([a(n) for n in range(1, 40)]) # Michael S. Branicky, Dec 10 2021

Formula

a(n) = A079704(n+1) for n>0.

A241912 Fixed points of A241916.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 13, 15, 16, 17, 18, 19, 23, 29, 31, 32, 37, 41, 43, 45, 47, 50, 53, 55, 59, 61, 64, 67, 71, 73, 79, 83, 89, 97, 98, 101, 103, 105, 107, 108, 109, 113, 119, 127, 128, 131, 135, 137, 139, 149, 150, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199
Offset: 1

Views

Author

Antti Karttunen, May 03 2014

Keywords

Comments

A natural number n occurs here if and only if it is either a power of 2, or satisfies A001511(n) = A071178(n) [the exponent of highest power of 2 dividing n is one less than the exponent of the largest prime factor of n], and all the intermediate exponents form a palindrome. [Please see the definition of A241916.]
Numbers for which the corresponding rows in A112798 and A241918 are the conjugate partitions of each other.

Examples

			98 = 2*7*7 = p_1^1 * p_2^0 * p_3^0 * p_4^2 is included because 2 occurs once, the highest prime factor 7 occurs twice (thus A001511(150) = A071178(150) = 2), and the intermediate exponents (in this case {0,0}) form a palindrome.
150 = 2*3*5*5 = p_1^1 * p_2^1 * p_3^2 is included because 2 occurs once, the highest prime factor 5 occurs twice (thus A001511(150) = A071178(150) = 2), and the intermediate exponents (in this case 1) form a palindrome.
		

Crossrefs

Complement: A241913.
A079704 is a subsequence.

Programs

  • Mathematica
    f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; g[w_List] := Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, w]; Table[#[[n + 1]]/2, {n, Length@ # - 1}] &@ Select[Range@ 400, g@ f@ # == g@ Reverse@ f@ # &] (* Michael De Vlieger, Aug 27 2016 *)

Formula

a(n) = A242418(n+1)/2.

A350245 Numbers p^2*q, p > q odd primes such that q divides p+1.

Original entry on oeis.org

75, 363, 867, 1183, 1587, 1805, 2523, 4205, 5043, 6627, 8427, 10443, 11767, 15123, 17405, 20339, 20667, 23763, 26011, 30603, 31205, 34347, 38307, 39605, 48223, 51483, 56307, 59405, 65863, 66603, 76313, 83667, 89787, 96123, 96605, 109443, 111005, 115351, 116427
Offset: 1

Views

Author

Bernard Schott, Dec 21 2021

Keywords

Comments

For these terms m, there are precisely 3 groups of order m, so this is a subsequence of A055561.
The 3 groups are C_{p^2*q}, (C_p X C_p) X C_q and (C_p X C_p) : C_q, where C means cyclic groups of the stated order, the symbols X and : mean direct and semidirect products respectively.

Examples

			75 = 5^2 * 3, 5 and 3 are odd and 3 divides 5+1 = 6, hence 75 is a term.
1183 = 13^2 * 7, 13 and 7 are odd and 7 divides 13+1 = 14, hence 1183 is another term.
		

References

  • Pascal Ortiz, Exercices d'Algèbre, Collection CAPES / Agrégation, Ellipses, problème 1.35, pp. 70-74, 2004.

Crossrefs

Intersection of A054753 and A055561.
Other subsequences of A054753 linked with order of groups: A079704, A143928, A349495, A350115.

Programs

  • Maple
    N:= 10^6: # for terms <= N
    P:= select(isprime, [seq(i,i=3..floor(sqrt(N/3)),2)]):
    g:= proc(p) local Q;
          Q:= numtheory:-factorset(p+1) minus {2};
          select(`<=`, map(q -> p^2*q, Q), N);
    end proc:
    sort(convert(`union`(op(map(g,P))),list)); # Robert Israel, Dec 28 2021
  • Mathematica
    q[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; e == {1, 2} && Divisible[p[[2]] + 1, p[[1]]]]; Select[Range[1, 2*10^5, 2], q] (* Amiram Eldar, Dec 21 2021 *)
  • Python
    from sympy import integer_nthroot, primerange
    def aupto(limit):
        aset, maxp = set(), integer_nthroot(limit**2, 3)[0]
        for p in primerange(3, maxp+1):
            pp = p*p
            for q in primerange(3, min(p-1, limit//pp)+1):
                if (p+1)%q == 0:
                    aset.add(pp*q)
        return sorted(aset)
    print(aupto(120000)) # Michael S. Branicky, Dec 21 2021

Extensions

More terms from Amiram Eldar, Dec 21 2021

A350115 Numbers p^2*q, p

Original entry on oeis.org

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

Views

Author

Bernard Schott, Dec 14 2021

Keywords

Comments

For these terms m, there are precisely 5 groups of order m, so this is a subsequence of A054397.
Two of them are abelian: C_{p^2*q}, C_q X C_p X C_p = C_q X (C_p)^2, and the three others that are nonabelian are C_q : (C_p x C_p), and two nonisomorphic semi-direct products C_q : C_p^2. Here C means cyclic groups of the stated order, the symbols X and : mean direct and semidirect products respectively.

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.

Crossrefs

Other subsequences of A054397: A030078, A079704, A143928.
Subsequence of A054753.

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

A242418 Numbers n in whose prime factorization, n = 2^e1 * 3^e2 * 5^e3 * ... * p_k^e_k, the exponents (some of them possibly zero) of prime factors from 2 to p_k form a palindrome, so that e1 = e_k, e2 = e_{k-1}, etc.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 14, 16, 22, 26, 30, 32, 34, 36, 38, 46, 58, 62, 64, 74, 82, 86, 90, 94, 100, 106, 110, 118, 122, 128, 134, 142, 146, 158, 166, 178, 194, 196, 202, 206, 210, 214, 216, 218, 226, 238, 254, 256, 262, 270, 274, 278, 298, 300, 302, 314, 326, 334
Offset: 1

Views

Author

Antti Karttunen, May 20 2014

Keywords

Comments

a(1)=1 is included because 1 has an empty factorization (either no exponents, or all of them are zero), which thus is also a palindrome.

Crossrefs

Fixed points of A137502.
Cf. A241912.
A002110 and A079704 are subsequences.

Programs

  • Mathematica
    f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; g[w_List] := Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, w]; Select[Range@ 336, g@ f@ # == g@ Reverse@ f@ # &] (* Michael De Vlieger, Aug 27 2016 *)

Formula

a(1)=1, and for n > 1, a(n) = 2 * A241912(n-1).

A350332 Numbers p^2*q, p < q odd primes such that p does not divide q-1.

Original entry on oeis.org

45, 99, 153, 175, 207, 261, 325, 369, 423, 425, 475, 477, 531, 539, 575, 637, 639, 725, 747, 801, 833, 909, 925, 931, 963, 1017, 1075, 1127, 1175, 1179, 1233, 1325, 1341, 1475, 1503, 1519, 1557, 1573, 1611, 1675, 1719, 1773, 1813, 1825, 1975, 2009, 2043, 2057
Offset: 1

Views

Author

Bernard Schott, Dec 25 2021

Keywords

Comments

For these terms m, there are precisely 2 groups of order m, so this is a subsequence of A054395.
The 2 groups are abelian; they are C_{p^2*q} and (C_p X C_p) X C_q, where C means cyclic groups of the stated order and the symbol X means direct product.

Examples

			99 = 3^2 * 11, 3 and 11 are odd and 3 does not divide 11-1 = 10, hence 99 is a term.
175 = 5^2 * 7, 5 and 7 are odd and 5 does not divide 7-1 = 6, hence 115 is another term.
		

References

  • Pascal Ortiz, Exercices d'Algèbre, Collection CAPES / Agrégation, Ellipses, problème 1.35, pp. 70-74, 2004.

Crossrefs

Subsequence of A051532, A054395, A054753 and of A060687.
Other subsequences of A054753 linked with order of groups: A079704, A143928, A349495, A350115, A350245.

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]]]]; Select[Range[2000], q] (* Amiram Eldar, Dec 25 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)); \\ Michel Marcus, Dec 25 2021
  • Python
    from sympy import integer_nthroot, primerange
    def aupto(limit):
        aset, maxp = set(), integer_nthroot(limit, 3)[0]
        for p in primerange(3, maxp+1):
            pp = p*p
            for q in primerange(p+1, limit//pp+1):
                if (q-1)%p != 0:
                    aset.add(pp*q)
        return sorted(aset)
    print(aupto(2060)) # Michael S. Branicky, Dec 25 2021
    

Extensions

More terms from Michael S. Branicky, Dec 25 2021

A350422 Numbers of the form m = p^2*q for which there exist exactly 2 groups of order m.

Original entry on oeis.org

45, 99, 153, 175, 207, 245, 261, 325, 369, 423, 425, 475, 477, 531, 539, 575, 637, 639, 725, 747, 801, 833, 845, 847, 909, 925, 931, 963, 1017, 1075, 1127, 1175, 1179, 1233, 1325, 1341, 1445, 1475, 1503, 1519, 1557, 1573, 1611, 1675, 1719, 1773, 1813, 1825, 1859, 1975, 2009
Offset: 1

Views

Author

Bernard Schott, Jan 03 2022

Keywords

Comments

Terms come from the union of terms of the form p^2*q with p < q in A350332 and terms of the same form with p > q in A350421, with p, q odd primes.
All terms are odd.
These 2 groups are abelian; they are C_{p^2*q} and (C_p X C_p) X C_q, where C means cyclic groups of the stated order and the symbol X means direct product.

Examples

			With p < q: 175 = 5^2 * 7, 5 and 7 are odd primes and 5 does not divide 7-1 = 6, hence 175 is a term (see A350332).
With p > q: 245 = 7^2 * 5, 5 and 7 are odd primes, 5 does not divide 7-1 = 6 and does not divide 7+1 = 8, hence 245 is a term (see A350421).
		

References

  • Pascal Ortiz, Exercices d'Algèbre, Collection CAPES / Agrégation, Ellipses, problème 1.35, pp. 70-74, 2004.

Crossrefs

Disjoint union of A350332 (pA350421 (p>q).
Intersection of A054395 and A054753.
Subsequence of A051532, A060687 and A350322.
Other subsequences of A054753 linked with order of groups: A079704, A143928, A349495, A350115, A350245, A350638.

Programs

  • Mathematica
    q[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; (e == {1, 2} && ! Or @@ Divisible[p[[2]] + {-1, 1}, p[[1]]]) || (e == {2, 1} && ! Divisible[p[[2]] - 1, p[[1]]])]; Select[Range[1, 2000, 2], q] (* Amiram Eldar, Jan 03 2022 *)
  • PARI
    isoka(f) = if (f[, 2] == [2, 1]~, my(p=f[1, 1], q=f[2, 1]); ((q-1) % p)); \\ A350332
    isokb(f) = if (f[, 2] == [1, 2]~, my(p=f[2, 1], q=f[1, 1]); ((p-1) % q) && ((p+1) % q)); \\ A350421
    isok(m) = my(f=factor(m)); isoka(f) || isokb(f); \\ Michel Marcus, Jan 09 2022

A350421 Numbers p^2*q, p > q odd primes such that q does not divide p-1, and q does not divide p+1.

Original entry on oeis.org

245, 845, 847, 1445, 1859, 2023, 2527, 2645, 3179, 3703, 3757, 3971, 4693, 6137, 6727, 6845, 6877, 8993, 9245, 9251, 9583, 10051, 10571, 10933, 11045, 12493, 14045, 14297, 15059, 15463, 15979, 16337, 17797, 18259, 18491, 19343, 19663, 21853, 22103, 22445, 23273
Offset: 1

Views

Author

Bernard Schott, Dec 30 2021

Keywords

Comments

As odd prime q does not divide p-1 and does not divide also p+1, then q >= 5, so p >= 7.
For these terms m, there are precisely 2 groups of order m, so this is a subsequence of A054395.
The 2 groups are abelian; they are C_{p^2*q} and (C_p X C_p) X C_q, where C means cyclic groups of the stated order and the symbol X means direct product.

Examples

			245 = 7^2 * 5, 5 and 7 are odd primes, 5 does not divide 7-1 = 10 and does not divide 7+1 = 8, hence 245 is a term.
		

References

  • Pascal Ortiz, Exercices d'Algèbre, Collection CAPES / Agrégation, Ellipses, problème 1.35, pp. 70-74, 2004.

Crossrefs

Equals A350422 \ A350332.
Subsequence of A051532, A054395, A054753, A060687 and A350322.
Other subsequences of A054753 linked with order of groups: A079704, A143928, A349495, A350115, A350245.

Programs

  • Magma
    f:=Factorisation; [n:n in [3..24000 ]|#PrimeDivisors(n) eq 2 and  f(n)[1][1] lt f(n)[2][1] and f(n)[1][2] eq 1 and f(n)[2][2] eq 2  and (f(n)[2][1]-1) mod f(n)[1][1] ne 0 and (f(n)[2][1]+1) mod f(n)[1][1] ne 0]; // Marius A. Burtea, Dec 30 2021
    
  • Mathematica
    q[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; e == {1, 2} && ! Or @@ Divisible[p[[2]] + {-1, 1}, p[[1]]]]; Select[Range[1, 24000, 2], q] (* Amiram Eldar, Dec 30 2021 *)
  • PARI
    isok(m) = my(f=factor(m)); if (f[, 2] == [1, 2]~, my(p=f[2, 1], q=f[1, 1]); ((p-1) % q) && ((p+1) % q)); \\ Michel Marcus, Dec 30 2021
  • Python
    from sympy import integer_nthroot, primerange
    def aupto(limit):
        aset, maxp = set(), integer_nthroot(limit**2, 3)[0]
        for p in primerange(3, maxp+1):
            pp = p*p
            for q in primerange(1, min(p, limit//pp+1)):
                if (p-1)%q != 0 and (p+1)%q != 0:
                    aset.add(pp*q)
        return sorted(aset)
    print(aupto(24000)) # Michael S. Branicky, Dec 30 2021
    

Extensions

More terms from Marius A. Burtea and Hugo Pfoertner, Dec 30 2021
Showing 1-10 of 20 results. Next