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.

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

This page as a plain text file.
%I A126393 #19 Aug 12 2023 01:09:58
%S A126393 1,6,24,100,418,1748,7310,30570,127842,534628,2235784,9349922,
%T A126393 39100844,163517514,683820978,2859700582,11959105792,50012302772,
%U A126393 209148616298,874647662172,3657726962214,15296406894730,63968706878962
%N A126393 Number of base 6 n-digit numbers with adjacent digits differing by two or less.
%C A126393 a(base,n) = a(base-1,n) + 5^(n-1) for base >= 2*n - 1.
%C A126393 a(base,n) = a(base-1,n) + 5^(n-1) - 2 when base = 2*(n-1).
%H A126393 G. C. Greubel, <a href="/A126393/b126393.txt">Table of n, a(n) for n = 0..1000</a>
%H A126393 Sergey Kitaev and Jeffrey Remmel, <a href="http://arxiv.org/abs/1304.4286">(a,b)-rectangle patterns in permutations and words</a>, arXiv:1304.4286 [math.CO], 2013.
%H A126393 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,1,-1).
%F A126393 G.f.: 1 + 2*x*(3-x^2)/(1-4*x-x^2+x^3). - _R. J. Mathar_, Jun 06 2013
%F A126393 a(n) = [n=0] + 6*A364705(n) - 2*A364705(n-2). - _G. C. Greubel_, Aug 08 2023
%t A126393 LinearRecurrence[{4,1,-1}, {1,6,24,100}, 41] (* _G. C. Greubel_, Aug 08 2023 *)
%o A126393 (S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-2](($[i]`-$[i+1]`>2)+($[i+1]`-$[i]`>2))
%o A126393 (Magma) I:=[1,6,24,100]; [n le 4 select I[n] else 4*Self(n-1) +Self(n-2) -Self(n-3): n in [1..41]]; // _G. C. Greubel_, Aug 08 2023
%o A126393 (SageMath)
%o A126393 @CachedFunction
%o A126393 def a(n): # A126393
%o A126393     if (n<4): return (1,6,24,100)[n]
%o A126393     else: return 4*a(n-1) +a(n-2) -a(n-3)
%o A126393 [a(n) for n in range(41)] # _G. C. Greubel_, Aug 08 2023
%Y A126393 Cf. Base 6 differing by one or less A126360.
%Y A126393 Cf. A364705.
%K A126393 nonn,base
%O A126393 0,2
%A A126393 _R. H. Hardin_, Dec 28 2006