OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Triangular Number.
Eric Weisstein's World of Mathematics, Almost Prime.
FORMULA
EXAMPLE
a(1) = 8 because T(8) = TriangularNumber(8) = 8*(8+1)/2 = 36 = 2^2 * 3^2 is a 4-almost prime.
a(2) = 16 because T(16) = 16*(16+1)/2 = 136 = 2^3 * 17 is a 4-almost prime.
a(3) = 20 because T(20) = 20*(20+1)/2 = 210 = 2 * 3 * 5 * 7 (210 = primorial 4#).
a(4) = 23 because T(23) = 23*(23+1)/2 = 276 = 2^2 * 3 * 23.
a(5) = 26 because T(26) = 26*(26+1)/2 = 351 = 3^3 * 13.
a(6) = 36 because T(36) = 36*(36+1)/2 = 666 = 2 * 3^2 * 37.
a(27) = 100 because T(100) = 100*(100+1)/2 = 5050 = 2 * 5^2 * 101.
a(57) = 210 because T(210) = 210*(210+1)/2 = 22155 = 3 * 5 * 7 * 211 (again, 210 = primorial 4#).
MATHEMATICA
Flatten[Position[Accumulate[Range[800]], _?(PrimeOmega[#]== 4 &)]] (* Vincenzo Librandi, Apr 09 2014 *)
PROG
(PARI) is(n)=my(t=bigomega(n/gcd(n, 2))); if(t<3, bigomega((n+1)/gcd(n+1, 2))+t==4, t==3 && isprime((n+1)/gcd(n+1, 2))) \\ Charles R Greathouse IV, Jun 14 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Feb 13 2006
STATUS
approved