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!)
A126378 Number of base 24 n-digit numbers with adjacent digits differing by one or less. 5

%I #8 Sep 25 2015 08:27:34

%S 1,24,70,206,608,1798,5324,15780,46806,138918,412508,1225432,3641690,

%T 10825628,32190154,95741294,284820048,847475910,2522096172,7507000776,

%U 22347852666,66537181776,198128815230,590039959434,1757365514652

%N Number of base 24 n-digit numbers with adjacent digits differing by one or less.

%C [Empirical] a(base,n)=a(base-1,n)+3^(n-1) for base>=n; a(base,n)=a(base-1,n)+3^(n-1)-2 when base=n-1

%H Alois P. Heinz, <a href="/A126378/b126378.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f.: -(7*x^12 +92*x^11 -206*x^10 -680*x^9 +1145*x^8 +946*x^7 -2100*x^6 +318*x^5 +1050*x^4 -725*x^3 +176*x^2 -11*x -1) / ((x^2 -3*x +1)*(x^10 +15*x^9 +10*x^8 -65*x^7 -10*x^6 +97*x^5 -35*x^4 -40*x^3 +35*x^2 -10*x +1)). - _Alois P. Heinz_, Sep 25 2015

%p b:= proc(n, i) option remember; `if`(n=0, 1, add(

%p `if`(i=0 or abs(i-j)<2, b(n-1, j), 0), j=1..24))

%p end:

%p a:= n-> b(n, 0):

%p seq(a(n), n=0..20); # _Alois P. Heinz_, Sep 25 2015

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

%K nonn,base

%O 0,2

%A _R. H. Hardin_, Dec 26 2006

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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)