login
A109824
a(n) is the number of consecutive integers starting with n summing up to a semiprime.
2
3, 3, 5, 1, 4, 1, 2, 4, 1, 1, 5, 2, 4, 1, 1, 2, 2, 3, 2, 4, 1, 1, 13, 2, 1, 1, 2, 2, 4, 3, 6, 2, 1, 1, 1, 3, 6, 1, 1, 3, 5, 2, 2, 7, 2, 1, 2, 6, 1, 4, 1, 3, 4, 6, 1, 7, 1, 1, 2, 2, 2, 1, 6, 2, 1, 2, 4, 4, 1, 2, 2, 2, 4, 1, 14, 6, 1, 3, 2, 2, 5, 1, 13, 2, 1, 1, 1, 2, 4, 14, 1, 2, 1, 1, 1, 3, 4, 4, 5, 2
OFFSET
1,1
LINKS
FORMULA
A109824(n) = A109823(n) - n + 1.
MATHEMATICA
Table[Position[Accumulate[Range[n, n+300]], _?(PrimeOmega[#]==2&), 1, 1], {n, 100}]//Flatten (* The parameter 300 is sufficient for n up to 100000 but might have to be increased for larger n. *) (* Harvey P. Dale, Feb 14 2018 *)
PROG
(PARI) { a(n) = my(s, m); s=n; m=n; while(bigomega(s)!=2, m++; s+=m); m-n+1 }
CROSSREFS
Sequence in context: A353412 A062563 A091931 * A011399 A205853 A240594
KEYWORD
nonn
AUTHOR
Zak Seidov & Max Alekseyev, Jul 03 2005
STATUS
approved