cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A088917 Central Delannoy numbers (mod 3); Characteristic function for Cantor set.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 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, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 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
Offset: 0

Views

Author

Benoit Cloitre, Nov 30 2003

Keywords

Comments

Also Apery numbers (mod 3).
More generally also (Sum_{k=0..n} binomial(n,k)^x*binomial(n+k,k)^y) (mod 3) for any x >= 1 in N and any odd y >= 1.
a(n) = 0 if the ternary expansion of n contains one or more 1-digits, otherwise 1. - Antti Karttunen, Aug 23 2019
Main diagonal of the Sierpinski carpet (A153490). - Paolo Xausa, May 19 2023

Crossrefs

Characteristic function of A005823, and with offset 1, characteristic function of A191106.

Programs

  • Mathematica
    Nest[ Flatten[# /. {0 -> {0, 0, 0}, 1 -> {1, 0, 1}}] &, {1}, 5] (* Or *)
    f[n_] := Mod[LegendreP[n, 3], 3]; Array[f, 111, 0] (* Or *)
    f[n_] := If[ FreeQ[ IntegerDigits[n, 3], 1], 1, 0]; Array[f, 111, 0] (* also from Mathematica v8.0 Mathematical Functions Help section for "IntegerDigits" "Cantor set construction:" *) (* Robert G. Wilson v, Jun 16 2011 *)
    Nest[Join[#, 0 #, #] &, {1}, 5] (* IWABUCHI Yu(u)ki, Sep 08 2012 *)
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)*binomial(n+k,k))%3
    
  • PARI
    A088917(n) = { while(n, if(n%3==1, return(0), n\=3)); (1); }; \\ Antti Karttunen, Aug 23 2019 (copied from A005823)
    
  • PARI
    A088917(n) = abs(factorback(apply(d -> d-1,digits(n,3)))); \\ Antti Karttunen, Aug 23 2019

Formula

a(A005823(n)) = 1; a(A081606(n)) = 0.
a(n) = A001850(n) - 3*floor(A001850(n)/3).
a(n) = 2 - A105220(n) = 1 - A316829(n). - Antti Karttunen and Jon Maiga, Aug 24 2019
G.f.: Product_{k>=0} (1 + x^(2*3^k)). - Ilya Gutkovskiy, Jun 05 2021

Extensions

Secondary name added by Antti Karttunen, Aug 23 2019