A130216 a(0) = 3; a(n) = a(n-1) + (number of multiples of 3 so far in the sequence).
3, 4, 5, 6, 8, 10, 12, 15, 19, 23, 27, 32, 37, 42, 48, 55, 62, 69, 77, 85, 93, 102, 112, 122, 132, 143, 154, 165, 177, 190, 203, 216, 230, 244, 258, 273, 289, 305, 321, 338, 355, 372, 390, 409, 428, 447, 467, 487, 507, 528, 550, 572, 594, 617, 640, 663, 687, 712
Offset: 0
Examples
3,4,5,6,8,10,12,15: next term is 19 which is 15 + 4 previous terms divisible by 3 (they are 3,6,12,15).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
a:= proc(n) local m, r; m:= iquo(n, 7, 'r'); (3+21*m+6*r) *m/2 +[3, 4, 5, 6, 8, 10, 12][r+1] end: seq(a(n), n=0..80); # Alois P. Heinz, Aug 12 2009
-
Mathematica
l={3};Do[AppendTo[l,Last[l]+Count[l,?(Divisible[#,3]&)]],{n,60}];l (* _Harvey P. Dale, Jul 24 2011 *)
Formula
G.f.: -(3*x^8-2*x^7+x^4-2*x+3) / (x^9-2*x^8+x^7-x^2+2*x-1). - Alois P. Heinz, Aug 12 2009
Extensions
More terms from Alois P. Heinz, Aug 12 2009
Comments