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 A350230 #32 Jan 24 2022 12:26:38 %S A350230 1,2,3,5,6,11,14,15,21,23,26,29,30,33,35,41,51,53,65,74,83,86,89,111, %T A350230 113,131,141,155,158,173,179,186,191,194,209,215,221,230,231,233,239, %U A350230 251,254,278,281,293,321,323,326,329,341,345,359,371,398,413,419,426 %N A350230 Numbers m such that for all factorizations m=a*b with positive integers (a, b), a*b+a+b is a prime. %C A350230 From _Marius A. Burtea_, Dec 26 2021: (Start) %C A350230 If p is a prime number in A005384 (Sophie Germain prime), then it is a term. Indeed, p = p*1 and p + p + 1 = 2*p + 1 is prime. %C A350230 All terms (m >= 2) are squarefree numbers (A005117). Indeed, if m = p^2*k, p >= 2, k >= 1, then m = p*(p*k) and p^2*k + p + p*k = p*(p*k + 1 + k ) is not prime. (End). %e A350230 1 is in the sequence because 1 = 1*1 and 1*1 + 1 + 1 = 3 is prime; %e A350230 30 is in the sequence because A038548(30) = 4 has 4 factorizations: %e A350230 30 = 1*30 = 2*15 = 3*10 = 5*6 and %e A350230 30 + 1 + 30 = 61 is prime; %e A350230 30 + 2 + 15 = 47 is prime; %e A350230 30 + 3 + 10 = 43 is prime; %e A350230 30 + 5 + 6 = 41 is prime. %p A350230 A350230 := proc(n) %p A350230 local a,b ; %p A350230 for a in numtheory[divisors](n) do %p A350230 b := n/a ; %p A350230 if not isprime(a*b+b+a) then %p A350230 return false; %p A350230 end if; %p A350230 end do: %p A350230 true ; %p A350230 end proc: %p A350230 for n from 1 to 500 do %p A350230 if isA350230(n) then %p A350230 printf("%d,",n) ; %p A350230 end if; %p A350230 end do: # _R. J. Mathar_, Jan 24 2022 %t A350230 t={};Do[ds=Divisors[n];If[EvenQ[Length[ds]],ok=True;k=1;While[k<=Length[ds]/2&&(ok=PrimeQ[ds[[k]]*ds[[-k]]+ds[[k]]+ds[[-k]]]),k++];If[ok,AppendTo[t,n]]],{n,2,4000}];t %o A350230 (Python) %o A350230 from sympy import divisors, isprime %o A350230 def ok(n): %o A350230 divs = divisors(n) %o A350230 if n == 0: return False %o A350230 return all(isprime(a*b+a+b) for a, b in ((d, n//d) for d in divs)) %o A350230 print([k for k in range(427) if ok(k)]) # _Michael S. Branicky_, Dec 21 2021 %o A350230 (PARI) isok(m) = sumdiv(m, d, isprime(m+d+m/d)) == numdiv(m); \\ _Michel Marcus_, Dec 25 2021 %o A350230 (Magma) [n:n in [1..450]|forall{d: d in Divisors(n)| IsPrime(n+d+n div d)}]; // _Marius A. Burtea_, Dec 26 2021 %Y A350230 Cf. A005117 (squarefree numbers), A005384 (Sophie Germain primes), A038548, A080715. %K A350230 nonn %O A350230 1,2 %A A350230 _Michel Lagneau_, Dec 21 2021