login
A227786
Take squares larger than 1, subtract 3 from even squares and 2 from odd squares; a(n) = a(n-1) + A168276(n+1) (with a(1) = 1).
2
1, 7, 13, 23, 33, 47, 61, 79, 97, 119, 141, 167, 193, 223, 253, 287, 321, 359, 397, 439, 481, 527, 573, 623, 673, 727, 781, 839, 897, 959, 1021, 1087, 1153, 1223, 1293, 1367, 1441, 1519, 1597, 1679, 1761, 1847, 1933, 2023, 2113, 2207, 2301, 2399, 2497, 2599, 2701
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.
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
(Scheme, two variants)
(definec (A227786 n) (if (< n 2) n (+ (A227786 (- n 1)) (A168276 (+ n 1)))))
(define (A227786v2 n) (- (A000290 (+ n 1)) 2 (modulo n 2)))
CROSSREFS
Bisections: A082109, A073577. Cf. also A227761.
Sequence in context: A043884 A129727 A275897 * A339148 A270792 A304671
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 31 2013
STATUS
approved