login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A334882
Numbers k such that k and k+2 are both primitive practical numbers (A267124).
5
28, 304, 306, 340, 460, 462, 858, 868, 1482, 1768, 1974, 2440, 2728, 2838, 2860, 3318, 3738, 4134, 4264, 4288, 4420, 4422, 5236, 5694, 6100, 6102, 7590, 8814, 9040, 9042, 10218, 11128, 11620, 11778, 12558, 12978, 13110, 14320, 14382, 14670, 15568, 16048, 16110
OFFSET
1,1
LINKS
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