OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
28 is a term since 28 and 28 + 2 = 30 are both primitive practical numbers.
MATHEMATICA
f[p_, e_] := (p^(e + 1) - 1)/(p - 1); pracQ[fct_] := (ind = Position[fct[[;; , 1]]/(1 + FoldList[Times, 1, f @@@ Most@fct]), _?(# > 1 &)]) == {}; pracTestQ[fct_, k_] := Module[{f = fct}, f[[k, 2]] -= 1; pracQ[f]]; primPracQ[n_] := Module[{fct = FactorInteger[n]}, pracQ[fct] && AllTrue[Range@Length[fct], fct[[#, 2]] == 1 || ! pracTestQ[fct, #] &]]; Select[Range[2, 16200, 2], primPracQ[#] && primPracQ[# + 2] &]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, May 14 2020
STATUS
approved