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.

A334882 Numbers k such that k and k+2 are both primitive practical numbers (A267124).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, May 14 2020

Keywords

Examples

			28 is a term since 28 and 28 + 2 = 30 are both primitive practical numbers.
		

Crossrefs

Programs

  • 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] &]