A179993 Numbers m with the property that, when a and b are positive integers such that a*b = m, |a-b| is prime.
3, 8, 14, 18, 38, 62, 98, 138, 230, 258, 278, 318, 338, 390, 398, 402, 458, 542, 678, 710, 770, 798, 822, 938, 1022, 1118, 1202, 1238, 1298, 1322, 1490, 1622, 1658, 2030, 2222, 2238, 2378, 2438, 2522, 2558, 2618, 2858, 2910, 3002, 3218, 3230, 3698, 4058, 4178
Offset: 1
Examples
Example : For n = 5, the possible values of |a-b| are 17 = 19-2 and 37 = 38-1.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Alois P. Heinz)
Programs
-
Mathematica
m=1;While[m < 10000, m++; If[Mod[m, 3] == 1, , V = Divisors[m]; L = Length[V]; j = 0; While[j < L/2, j++; x = (m/V[[j]]) - V[[j]]; If[PrimeQ[x], , j = L]]; If[j == L/2, X = Append[X, m],]]]; X q[n_] := AllTrue[Divisors[n], #^2 > n || PrimeQ[Abs[# - n/#]] &]; Select[Range[4000], q] (* Amiram Eldar, Nov 15 2021 *)
-
Python
from itertools import islice, takewhile, count from sympy import isprime, divisors def A179993(): # generator of terms for m in count(1): if all(isprime(m//a-a) for a in takewhile(lambda x: x*x <= m, divisors(m))): yield m A179993_list = list(islice(A179993(),20)) # Chai Wah Wu, Nov 15 2021
Comments