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.

A019308 Number of "bifix-free" words of length n over a three-letter alphabet.

Original entry on oeis.org

1, 3, 6, 18, 48, 144, 414, 1242, 3678, 11034, 32958, 98874, 296208, 888624, 2664630, 7993890, 23977992, 71933976, 215790894, 647372682, 1942085088, 5826255264, 17478666918, 52436000754, 157307706054, 471923118162
Offset: 0

Views

Author

Keywords

Crossrefs

Equals 3*A045694(n) for n>0. Cf. A003000, A019309.

Programs

  • Mathematica
    a[0]=1; a[n_]:=a[n]=3*a[n-1]-If[EvenQ[n], a[n/2], 0] (* Ed Pegg Jr, Jan 05 2005 *)

Formula

a(2n+1) = 3a(2n); a(2n) = 3a(2n-1) - a(n).