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.

User: Armend Shabani

Armend Shabani's wiki page.

Armend Shabani has authored 1 sequences.

A307469 a(n) = 2*a(n-1) + 6*a(n-2) for n >= 2, a(0) = 1, a(1) = 5.

Original entry on oeis.org

1, 5, 16, 62, 220, 812, 2944, 10760, 39184, 142928, 520960, 1899488, 6924736, 25246400, 92041216, 335560832, 1223368960, 4460102912, 16260419584, 59281456640, 216125430784, 787939601408, 2872631787520, 10472901183488, 38181593092096, 139200593285120
Offset: 0

Author

Armend Shabani, Apr 09 2019

Keywords

Comments

a(n) is the number of words of length n over alphabet {1,2,3,4,5} such that no odd letter is followed by an odd letter.

Examples

			For n=2 the a(2)=16 solutions are: 12, 14, 21, 22, 23, 24, 25, 32, 34, 41, 42, 43, 44, 45, 52, 54.
		

Crossrefs

The same over alphabet {1,2,3} gives A001045(n+2).

Programs

  • Maple
    aseq:=proc(n) option remember;
    if n<0 then return "seq not defined for negative indices";
    elif n=0 then return 1;
    elif n=1 then return 5;
    else 2*aseq(n-1)+6*aseq(n-2);
    end if;
    end proc:
    seq(aseq(n),n=0..26);
  • Mathematica
    a[0] = 1; a[1] = 5;
    a[n_] := a[n] = 2*a[n - 1] + 6*a[n - 2];
    Table[a[n], {n, 0, 26}]
    LinearRecurrence[{2,6},{1,5},30] (* Harvey P. Dale, Feb 20 2023 *)

Formula

a(n) = (-(2/7)*sqrt(7)+1/2)*(1-sqrt(7))^n+((2/7)*sqrt(7)+1/2)*(1+sqrt(7))^n.
G.f.: (1+3*x)/(1-2*x-6*x^2).
a(n) = 3*A083099(n) + A083099(n+1). - R. J. Mathar, Jan 27 2020