OFFSET
1,2
COMMENTS
Conjecture: from n>=2 onward, a(n) gives the positions of 2's in A227761.
a(29) = 897 = 3*13*23 is the first term which is neither prime nor semiprime, that is, has more than two prime divisors.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = A000290(n+1) - 2 - (n mod 2).
a(1)=1, and for n>1, a(n) = a(n-1)+A168276(n+1).
a(n) = (1/2) * (2*n^2 + 4*n -3 + (-1)^n) = 2*A116940(n-1) + 1. a(n-1) = 2*ceiling(n^2/2) - 3 = 2*A000985(n) - 3. G.f.: x*(-x^3 - x^2 + 5*x + 1)/((1-x)^3 * (1+x)). - Ralf Stephan, Aug 10 2013
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 31 2013
STATUS
approved