|
|
A088917
|
|
Central Delannoy numbers (mod 3); Characteristic function for Cantor set.
|
|
10
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
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
|
|
LINKS
|
|
|
FORMULA
|
|
|
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 *)
|
|
PROG
|
(PARI) a(n)=sum(k=0, n, binomial(n, k)*binomial(n+k, k))%3
|
|
CROSSREFS
|
Characteristic function of A005823, and with offset 1, characteristic function of A191106.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|