%I #26 Feb 16 2025 08:32:59
%S 7,16,23,30,32,36,42,45,54,69,78,79,80,84,88,90,93,95,100,102,104,112,
%T 115,117,140,143,151,153,165,170,174,176,184,186,191,200,203,210,213,
%U 228,232,234,245,250,259,271,273,282,287,296,306,308,310,311,318,319
%N Numbers k such that the k-th heptagonal number is 5-almost prime.
%H Amiram Eldar, <a href="/A114556/b114556.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AlmostPrime.html">Almost Prime</a>.
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HeptagonalNumber.html">Heptagonal Number</a>.
%F Numbers k such that Hep(k) = k*(5*k-3)/2 is 5-almost prime.
%F Numbers k such that A000566(k) is a term of A014614.
%F Numbers k such that A001222(A000566(k)) = 5.
%F Numbers k such that A001222(k*(5*k-3)/2) = 5.
%e 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].
%e a(2) = 16 because Hep(16) = 16*(5*16-3)/2 = 616 = 2^3 * 7 * 11 is 5-almost prime.
%e a(3) = 23 because Hep(23) = 23*(5*23-3)/2 = 1288 = 2^3 * 7 * 23.
%e a(18) = 100 because Hep(100) = 100*(5*100-3)/2 = 24850 = 2 * 5^2 * 7 * 71.
%e 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].
%t Select[Range[400], PrimeOmega[# (5 # - 3)/2] == 5 &] (* _Giovanni Resta_, Jun 14 2016 *)
%t Select[Range[400],PrimeOmega[PolygonalNumber[7,#]]==5&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 22 2020 *)
%Y Cf. A000040, A000566, A001222, A001358, A014614.
%K easy,nonn,changed
%O 1,1
%A _Jonathan Vos Post_, Feb 15 2006
%E Corrected and extended by _Giovanni Resta_, Jun 14 2016