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!)
A039970 An example of a d-perfect sequence: a(2*n) = 0, a(2*n+1) = Catalan(n) mod 3. 1
1, 0, 1, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
D. Kohel, S. Ling and C. Xing, Explicit Sequence Expansions, in Sequences and their Applications, C. Ding, T. Helleseth, and H. Niederreiter, eds., Proceedings of SETA'98 (Singapore, 1998), 308-317, 1999. DOI: 10.1007/978-1-4471-0551-0_23
FORMULA
a(2*n) = 0, a(2*n+1) = A039969(n). - Christian G. Bower, Jun 12 2005, sign edited because of changed offset of A039969. - Antti Karttunen, Feb 13 2019
MATHEMATICA
Table[If[IntegerQ[n/2], 0, Mod[CatalanNumber[(n-1)/2], 3]], {n, 1, 100}] (* G. C. Greubel, Feb 13 2019 *)
PROG
(PARI)
A039969(n) = ((binomial(2*n, n)/(n+1))%3);
A039970(n) = if(n%2, A039969((n-1)/2), 0); \\ Antti Karttunen, Feb 13 2019
(Sage)
def A039970(n):
if (mod(n, 2)==0):
return 0
else:
return mod(catalan_number((n-1)/2), 3)
[A039970(n) for n in (1..100)] # G. C. Greubel, Feb 13 2019
(Magma) [n mod 2 eq 0 select 0 else Catalan(Floor((n-1)/2)) mod 3: n in [1..100]]; // G. C. Greubel, Feb 13 2019
CROSSREFS
Cf. A039969.
Sequence in context: A038555 A138108 A158777 * A179212 A105118 A245359
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Christian G. Bower, Jun 12 2005
Formula added to the name by Antti Karttunen, Feb 13 2019
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 April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)