login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A124697 Number of base 4 circular n-digit numbers with adjacent digits differing by 1 or less. 3
1, 4, 10, 22, 54, 134, 340, 872, 2254, 5854, 15250, 39802, 104004, 271964, 711490, 1861862, 4873054, 12755614, 33391060, 87413152, 228841254, 599099054, 1568437210, 4106182322, 10750060804, 28143920884, 73681573690, 192900592822, 505019869254, 1322158472054 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

[Empirical] a(base,n)=a(base-1,n)+A002426(n+1) for base>=1.int(n/2)+1

a(n) = T(n, 4) where T(n, k) = Sum_{j=1..k} (1+2*cos(j*Pi/(k+1)))^n. These are the number of smooth cyclic words of length n over the alphabet {1,2,3,4}. See theorem 3.3 in Knopfmacher and others, reference in A124696. - Peter Luschny, Aug 13 2012

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (4,-3,-2,1).

FORMULA

G.f.: -(3*x^4-4*x^3-3*x^2+1) / ((x^2-3*x+1)*(x^2+x-1)). - Colin Barker, Jul 19 2015

MATHEMATICA

LinearRecurrence[{4, -3, -2, 1}, {1, 4, 10, 22, 54}, 30] (* Harvey P. Dale, Oct 14 2016 *)

PROG

(S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-1](($[i]`-$[(i+1)mod N]`>1)+($[(i+1)mod N]`-$[i]`>1))

(PARI) Vec(-(3*x^4-4*x^3-3*x^2+1)/((x^2-3*x+1)*(x^2+x-1)) + O(x^40)) \\ Colin Barker, Jul 19 2015

CROSSREFS

Sequence in context: A137247 A155407 A318416 * A155426 A155421 A155343

Adjacent sequences:  A124694 A124695 A124696 * A124698 A124699 A124700

KEYWORD

nonn,base,easy

AUTHOR

R. H. Hardin, Dec 28 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 2 06:43 EDT 2022. Contains 357191 sequences. (Running on oeis4.)