OFFSET
1,3
EXAMPLE
a(1) = 1 because 3-almostprime(1) = 8 and 3-almostprime(2) = 12, greatest prime factor(12) = 3, greatest prime factor(8) = 2 and 3-2 = 1.
a(3) = gpf(20) - gpf(18) = 5 - 3 = 2.
a(4) = gpf(27) - gpf(20) = 3 - 5 = -2.
MAPLE
A014612 := proc(nmax) local a, n; a := [8] ; while nops(a) < nmax do n := op(-1, a)+1 ; while numtheory[bigomega](n) <> 3 do n := n+1 ; od ; a := [op(a), n] ; od ; RETURN(a) ; end: A006530 := proc(n) op(1, op(-1, ifactors(n)[2])) ; end: A127171 := proc(nmax) local a, threeAlm, i ; threeAlm := A014612(nmax) ; a := [] ; for i from 2 to nops(threeAlm) do a := [op(a), A006530(op(i, threeAlm))-A006530(op(i-1, threeAlm)) ] ; od ; RETURN(a) ; end: A127171(100) ; # R. J. Mathar, Apr 01 2007
MATHEMATICA
Last[#]-First[#]&/@(Partition[FactorInteger[#][[-1, 1]]&/@Select[Range[ 500], PrimeOmega[#]==3&], 2, 1]) (* Harvey P. Dale, May 30 2014 *)
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Jonathan Vos Post, Mar 25 2007
EXTENSIONS
More terms from R. J. Mathar, Apr 01 2007
STATUS
approved