OFFSET
1,2
COMMENTS
Conjecture: for every odd integer r > 1, the following statements are equivalent: a) r is a term of this sequence, b) r + 1 is a term of this sequence, c) r + 2 is composite.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
The 7th tetrahedral number is 84, and 84*60 = 5040 = 7!.
MAPLE
q := n -> (irem(n!, n*(n+1)*(n+2)/6) = 0):
select(q, [$1..120])[];
MATHEMATICA
Select[Range@ 120, Mod[#!, Pochhammer[#, 3]/6] == 0 &] (* Michael De Vlieger, Jul 08 2019 *)
PROG
(PARI) isok(k) = !(k! % (k*(k+1)*(k+2)/6)); \\ Michel Marcus, Jun 28 2019
(PARI) is(n) = { my(f = factor(binomial(n + 2, 3))); forstep(i = #f~, 1, -1, if(val(n, f[i, 1]) - f[i, 2] < 0, return(0) ) ); 1 }
val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Mar 22 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lorenzo Sauras Altuzarra, Jun 28 2019
STATUS
approved