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!)
A117909 Count, inserting 0 after every even number. 2
1, 2, 0, 3, 4, 0, 5, 6, 0, 7, 8, 0, 9, 10, 0, 11, 12, 0, 13, 14, 0, 15, 16, 0, 17, 18, 0, 19, 20, 0, 21, 22, 0, 23, 24, 0, 25, 26, 0, 27, 28, 0, 29, 30, 0, 31, 32, 0, 33, 34, 0, 35, 36, 0, 37, 38, 0, 39, 40, 0, 41, 42, 0, 43, 44, 0, 45, 46, 0, 47, 48, 0, 49, 50, 0, 51, 52, 0, 53, 54, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Row sums of A117908.

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

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

FORMULA

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

a(n) = Sum_{k=0..n} 0^abs(L(C(n,2)/3) - 2*L(C(k,2)/3)) where L(j/p) is the Legendre symbol of j and p.

a(n) = sin((n+1)*Pi/3)*((8*n+14)*sin((n+1)*Pi/3) - sqrt(3)*cos(n*Pi))/9. - Wesley Ivan Hurt, Sep 24 2017

MATHEMATICA

Riffle[Range[60], 0, 3] (* Harvey P. Dale, Sep 12 2013 *)

PROG

(Magma) I:=[1, 2, 0, 3, 4, 0]; [n le 6 select I[n] else 2*Self(n-3) - Self(n-6): n in [1..91]]; // G. C. Greubel, Oct 21 2021

(Sage)

def a(n): return (2*n+3)/3 if (n%3==0) else 2*(n+2)/3 if (n%3==1) else 0

[a(n) for n in (0..90)] # G. C. Greubel, Oct 21 2021

CROSSREFS

Cf. A009947, A117908.

Sequence in context: A352835 A349953 A349339 * A261094 A091538 A340991

Adjacent sequences: A117906 A117907 A117908 * A117910 A117911 A117912

KEYWORD

easy,nonn

AUTHOR

Paul Barry, Apr 01 2006

STATUS

approved

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 February 26 20:56 EST 2023. Contains 360679 sequences. (Running on oeis4.)