OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
Eric Weisstein's World of Mathematics, Almost Prime.
Eric Weisstein's World of Mathematics, Heptagonal Number.
FORMULA
EXAMPLE
a(1) = 7 because Hep(7) = 7*(5*7-3)/2 = 112 = 2^4 * 7 is 5-almost prime [also 112 = Hep(7) = Hep(Hep(2)) is an iterated heptagonal number].
a(2) = 16 because Hep(16) = 16*(5*16-3)/2 = 616 = 2^3 * 7 * 11 is 5-almost prime.
a(3) = 23 because Hep(23) = 23*(5*23-3)/2 = 1288 = 2^3 * 7 * 23.
a(18) = 100 because Hep(100) = 100*(5*100-3)/2 = 24850 = 2 * 5^2 * 7 * 71.
a(21) = 112 because Hep(112) = 112*(5*112-3)/2 = 31192 = 2^3 * 7 * 557 [also 31192 = Hep(112) = Hep(Hep(7)) = Hep(Hep(Hep(2))) is an iterated heptagonal number].
MATHEMATICA
Select[Range[400], PrimeOmega[# (5 # - 3)/2] == 5 &] (* Giovanni Resta, Jun 14 2016 *)
Select[Range[400], PrimeOmega[PolygonalNumber[7, #]]==5&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 22 2020 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Feb 15 2006
EXTENSIONS
Corrected and extended by Giovanni Resta, Jun 14 2016
STATUS
approved