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.

A126392 Number of base 5 n-digit numbers with adjacent digits differing by two or less.

Original entry on oeis.org

1, 5, 19, 75, 295, 1161, 4569, 17981, 70763, 278483, 1095951, 4313041, 16973681, 66798773, 262882051, 1034554523, 4071419319, 16022795225, 63056626377, 248155086189, 976597549531, 3843333571747, 15125179200799, 59524119253665
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

a(base,n)=a(base-1,n)+5^(n-1) for base>=2n-1; a(base,n)=a(base-1,n)+5^(n-1)-2 when base=2n-2.

Crossrefs

Cf. Base 5 differing by one or less A057960.

Programs

  • Mathematica
    LinearRecurrence[{4,0,-1},{1,5,19},30] (* Harvey P. Dale, Apr 27 2018 *)

Formula

a(n) = 4*a(n-1)-a(n-3). G.f.: -(x^2-x-1)/(x^3-4*x+1). [Colin Barker, Nov 25 2012]

Extensions

Edited by Charles R Greathouse IV, Aug 05 2010