login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A143101 Partial sums of A143097. 3

%I #16 Jun 20 2017 23:25:34

%S 1,3,7,10,15,22,28,36,46,55,66,79,91,105,121,136,153,172,190,210,232,

%T 253,276,301,325,351,379,406,435,466,496,528,562,595,630,667,703,741,

%U 781,820,861,904,946,990,1036,1081,1128,1177,1225,1275,1327,1378,1431

%N Partial sums of A143097.

%H Nathaniel Johnston, <a href="/A143101/b143101.txt">Table of n, a(n) for n = 1..10000</a>

%F G.f.: x(1+x+2x^2-2x^3+x^4)/((1-x)^3(1+x+x^2)). [_R. J. Mathar_, Sep 06 2008]

%F a(n) = n*(n+1)/2 + (3|n) = A000217(n) + A079978(n). - _Luc Rousseau_, Jun 18 2017

%e a(3) = 7 = T(3) + 1 since 3 == 0 mod 3 and T(3) = 6.

%e a(4) = 10 = T(4) since 4 == 1 mod 3.

%p A143097 := proc(n) if(n<=1)then return n: elif(n mod 3 <= 1)then return n+1-2*(n mod 3): else return n: fi: end: A143101 := proc(n) option remember: if(n=0)then return 0:else return procname(n-1)+A143097(n):fi: end:seq(A143101(n),n=1..60); # _Nathaniel Johnston_, Apr 30 2011

%t With[{nn=70},Accumulate[Join[{1},Riffle[Rest[Select[Range[nn], !Divisible[ #,3]&]], Range[3,nn,3],3]]]] (* _Harvey P. Dale_, May 06 2012 *)

%o (PARI) a(n)=n*(n+1)/2+if(n%3==0,1,0) \\ _Luc Rousseau_, Jun 18 2017

%Y Cf. A000217, A143097.

%K nonn,easy

%O 1,2

%A _Gary W. Adamson_, Jul 24 2008

%E a(18) corrected by _Nathaniel Johnston_, Apr 30 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:23 EDT 2024. Contains 371967 sequences. (Running on oeis4.)