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 A381525 #33 Mar 29 2025 18:17:28 %S A381525 6,10,15,22,26,35,38,51,58,74,85,87,106,115,118,119,122,134,143,159, %T A381525 166,185,187,202,214,215,235,247,262,265,267,278,298,303,319,326,339, %U A381525 346,358,362,365,391,394,411,415,422,427,447,451,454,481,485,515,519,527 %N A381525 Squarefree semiprimes k = p*q, primes p < q, with q distinct power residues r (mod k) congruent to p^m, m >= 0, and p distinct power residues r (mod k) congruent to q^m, m >= 0. %C A381525 Define S(n,p) to be the set of distinct power residues r (mod n) beginning with 1 and thereafter multiplying by prime divisor p | n. For example, S(10,2) = {1, 2, 4, 8, 6}, S(10,5) = {1, 5}. %C A381525 This sequence contains squarefree semiprimes p*q such that card(S(p*q),p) = q and card(S(p*q),q) = p. %H A381525 Michael De Vlieger, <a href="/A381525/b381525.txt">Table of n, a(n) for n = 1..10000</a> %H A381525 Michael De Vlieger, <a href="/A381525/a381525.png">Plot p*q at (x,y) = (pi(p),pi(q))</a> for terms whose prime factors do not exceed prime(48) = 223, labeling terms with p*q < 200, or pi(p) over pi(q) in italics otherwise. Light gray dots indicate squarefree semiprimes that are not in the sequence, principally for clarity. %H A381525 Michael De Vlieger, <a href="/A381525/a381525_1.png">Plot p*q at (x,y) = (pi(p),pi(q))</a> for terms whose prime factors do not exceed prime(256) = 1619, 4X exaggeration. %H A381525 Michael De Vlieger, <a href="/A381525/a381525_2.png">Plot p*q at (x,y) = (pi(p),pi(q))</a> for terms whose prime factors do not exceed prime(1024) = 8161. Demonstrates density of terms in this sequence among squarefree semiprimes. %F A381525 A381804(a(n)) = 0. %e A381525 a(1) = 6 since S(6,2) = {1,2,4} and S(6,3) = {1,3}. %e A381525 a(2) = 10 is a term since S(10,2) = {1,2,4,8,6} and S(10,5) = {1,5}. %e A381525 14 = 2*7 is not a term since S(14,2) = {1,2,4,8}, with only 4 terms. %e A381525 a(3) = 15 since S(15,3) = {1,3,9,12,6} and S(15,5) = {1,5,10}. %e A381525 21 = 3*7 is not a term since S(21,7) = {1,7}, with only 2 terms. %e A381525 a(4) = 22 = 2*11 since S(22,2) = {1,2,4,8,16,10,20,18,14,6,12} and S(22,11) = {1,11}. %e A381525 34 = 2*17 is not a term since S(34,2) = {1,2,4,8,16,32,30,26,18}, with only 9 terms. %e A381525 a(16) = 119 = 7*17 since card(S(119,7)) = 17 and card(S(119,17)) = 7, etc. %t A381525 nn = 530; %t A381525 s = Join @@ Table[{p, q}, %t A381525 {p, Prime@ Range[PrimePi@ Sqrt[nn]]}, %t A381525 {q, Prime@ Range[PrimePi[p] + 1, PrimePi[nn/p]]}]; %t A381525 Union@ Reap[Do[ %t A381525 n = Times @@ s[[i]]; %t A381525 Set[{p, q}, s[[i]]]; %t A381525 If[DuplicateFreeQ@ Map[PowerMod[p, #, n] &, Divisors[q - 1]], %t A381525 If[DuplicateFreeQ@ Map[PowerMod[q, #, n] &, Divisors[p - 1]], %t A381525 Sow[n] ] ], {i, Length[s]}] ][[-1, 1]] %Y A381525 Cf. A007947, A006881, A381804. %K A381525 nonn,easy %O A381525 1,1 %A A381525 _Michael De Vlieger_, Mar 24 2025