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 A323550 #27 May 22 2025 16:36:21 %S A323550 3,5,7,9,11,13,17,19,21,23,25,29,31,33,37,41,43,45,47,49,53,57,59,61, %T A323550 65,67,71,73,79,81,83,85,89,93,97,101,103,105,107,109,113,117,121,127, %U A323550 131,133,137,139,141,145,149,151,157,161,163,165,167,169,173,177,179,181,185,191,193,197,199,201,205,209 %N A323550 Numbers that can be expressed as (p - 1)*(q - 1) + 1, where p < q are primes. %C A323550 If p < q are primes and a(n) = (p - 1)*(q - 1) + 1, then x^a(n) == x (mod p*q) for every integer x. %H A323550 Robert Israel, <a href="/A323550/b323550.txt">Table of n, a(n) for n = 1..10000</a> %H A323550 A. Bogomolny, <a href="http://www.cut-the-knot.org/blue/Euler.shtml">Euler Function and Theorem</a> %e A323550 181 is a term because 181 = (11 - 1)*(19 - 1) + 1. - _Bernard Schott_, Jan 19 2019 %p A323550 N:= 1000: # for terms <= N %p A323550 S:= {}: %p A323550 P:= select(isprime,[2,seq(i,i=3..N,2)]): nP:= nops(P): %p A323550 for i from 1 to nP do %p A323550 for j from i+1 to nP do %p A323550 v:= (P[i]-1)*(P[j]-1)+1; %p A323550 if v > N then break fi; %p A323550 S:= S union {v} %p A323550 od od: %p A323550 sort(convert(S,list)); # _Robert Israel_, May 22 2025 %t A323550 nmax = 100; %t A323550 pairs = Table[Table[(Prime[i] - 1)*(Prime[j] - 1) + 1, {i, 1, j - 1}], {j, 2,Prime[nmax]}]; %t A323550 (DeleteDuplicates@Sort@Flatten@pairs)[[1 ;; nmax]] %o A323550 (PARI) isok(n) = {if (n % 2, forprime(p = 2, n, forprime(q = p+1, n, if (n == (p - 1)*(q - 1) + 1, return (1)););););} \\ _Michel Marcus_, Feb 25 2019 %Y A323550 Cf. A065091. %K A323550 nonn %O A323550 1,1 %A A323550 _Andres Cicuttin_, Jan 17 2019