login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130481 a(n) = Sum_{k=0..n} (k mod 3) (i.e., partial sums of A010872). 29
0, 1, 3, 3, 4, 6, 6, 7, 9, 9, 10, 12, 12, 13, 15, 15, 16, 18, 18, 19, 21, 21, 22, 24, 24, 25, 27, 27, 28, 30, 30, 31, 33, 33, 34, 36, 36, 37, 39, 39, 40, 42, 42, 43, 45, 45, 46, 48, 48, 49, 51, 51, 52, 54, 54, 55, 57, 57, 58, 60, 60, 61, 63, 63, 64, 66, 66, 67, 69, 69, 70, 72, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Essentially the same as A092200. - R. J. Mathar, Jun 13 2008

Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 3, A[i,i]:=1, A[i,i-1]=-1. Then, for n>=1, a(n)=det(A). - Milan Janjic, Jan 24 2010

2-adic valuation of A104537(n+1). - Gerry Martens, Jul 14 2015

LINKS

Table of n, a(n) for n=0..72.

Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).

FORMULA

a(n) = 3*floor(n/3)+A010872(n)*(A010872(n)+1)/2.

G.f.: g(x)=(2x^2+x)/((1-x^3)(1-x)).

a(n) = n+1-(Fibonacci(n+1) mod 2). - Gary Detlefs, Mar 13 2011

a(n) = [(n+1)/3]+[2(n+1)/3], where []=floor. - Clark Kimberling, May 28 2010

a(n) = n when n+1 is not a multiple of 3, and a(n) = n+1 when n+1 is a multiple of 3. - Dennis P. Walsh, Aug 06 2012

MAPLE

a:=n->add(chrem( [n, j], [1, 3] ), j=1..n):seq(a(n), n=0..72); # Zerinvary Lajos, Apr 07 2009

MATHEMATICA

a[n_] := Floor[(n + 1)/3] + Floor[2 (n + 1)/3]; Table[a[n], {n, 0, 90}] (* Clark Kimberling, May 28 2012 *)

a[n_] := IntegerExponent[A104537[n + 1], 2];

Table[a[n], {n, 0, 90}]  (* Gerry Martens, Jul 14 2015 *)

PROG

(PARI) main(size)=my(n, k); vector(size, n, sum(k=0, n, k%3)) \\ Anders Hellström, Jul 14 2015

(PARI) first(n)=my(s); concat(0, vector(n, k, s+=k%3)) \\ Charles R Greathouse IV, Jul 14 2015

(PARI) a(n)=n\3*3+[0, 1, 3][n%3+1] \\ Charles R Greathouse IV, Jul 14 2015

CROSSREFS

Cf. A010872, A010873, A010874, A010875, A010876, A010877, A130482, A130483, A130484.

Sequence in context: A074883 A196245 A092200 * A145805 A277192 A098238

Adjacent sequences:  A130478 A130479 A130480 * A130482 A130483 A130484

KEYWORD

nonn,easy

AUTHOR

Hieronymus Fischer, May 29 2007

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified March 24 06:12 EDT 2017. Contains 283984 sequences.