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.

A350230 Numbers m such that for all factorizations m=a*b with positive integers (a, b), a*b+a+b is a prime.

Original entry on oeis.org

1, 2, 3, 5, 6, 11, 14, 15, 21, 23, 26, 29, 30, 33, 35, 41, 51, 53, 65, 74, 83, 86, 89, 111, 113, 131, 141, 155, 158, 173, 179, 186, 191, 194, 209, 215, 221, 230, 231, 233, 239, 251, 254, 278, 281, 293, 321, 323, 326, 329, 341, 345, 359, 371, 398, 413, 419, 426
Offset: 1

Views

Author

Michel Lagneau, Dec 21 2021

Keywords

Comments

From Marius A. Burtea, Dec 26 2021: (Start)
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.
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).

Examples

			1 is in the sequence because 1 = 1*1 and 1*1 + 1 + 1 = 3 is prime;
30 is in the sequence because A038548(30) = 4 has 4 factorizations:
30 = 1*30 = 2*15 = 3*10 = 5*6 and
30 + 1 + 30 = 61 is prime;
30 + 2 + 15 = 47 is prime;
30 + 3 + 10 = 43 is prime;
30 + 5 + 6 = 41 is prime.
		

Crossrefs

Cf. A005117 (squarefree numbers), A005384 (Sophie Germain primes), A038548, A080715.

Programs

  • Magma
    [n:n in [1..450]|forall{d: d in Divisors(n)| IsPrime(n+d+n div d)}]; // Marius A. Burtea, Dec 26 2021
  • Maple
    A350230 := proc(n)
        local a,b ;
        for a in numtheory[divisors](n) do
            b := n/a ;
            if not isprime(a*b+b+a) then
                return false;
            end if;
        end do:
        true ;
    end proc:
    for n from 1 to 500 do
        if isA350230(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jan 24 2022
  • Mathematica
    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
  • PARI
    isok(m) = sumdiv(m, d, isprime(m+d+m/d)) == numdiv(m); \\ Michel Marcus, Dec 25 2021
    
  • Python
    from sympy import divisors, isprime
    def ok(n):
        divs = divisors(n)
        if n == 0: return False
        return all(isprime(a*b+a+b) for a, b in ((d, n//d) for d in divs))
    print([k for k in range(427) if ok(k)]) # Michael S. Branicky, Dec 21 2021