login
a(0)=0; a(n)=6*a(n-1)+6.
3

%I #34 Mar 12 2024 14:50:54

%S 0,6,42,258,1554,9330,55986,335922,2015538,12093234,72559410,

%T 435356466,2612138802,15672832818,94036996914,564221981490,

%U 3385331888946,20311991333682,121871948002098,731231688012594,4387390128075570,26324340768453426,157946044610720562

%N a(0)=0; a(n)=6*a(n-1)+6.

%C Number of integers from 0 to (10^n)-1 that lack 0, 1, 2 and 3 as a digit.

%C Also, a(n) is the expected number of tosses of a single die needed to obtain for the first time a string of n consecutive 6's. - _Jean M. Morales_, Aug 04 2012

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (7,-6).

%F a(n) = 6^n+a(n-1) (with a(0)=0). - _Vincenzo Librandi_, Nov 13 2010

%F a(n) = 7*a(n-1)-6*a(n-2). G.f.: 6*x/((x-1)*(6*x-1)). - _Colin Barker_, Jan 28 2013

%p a:=n->add(6^j,j=1..n): seq(a(n),n=0..30); # _Zerinvary Lajos_, Oct 03 2007

%t NestList[6#+6&,0,30] (* _Harvey P. Dale_, Jul 24 2012 *)

%o (PARI) a(n)=if(n<0,0, (6^n-1)*6/5)

%Y Cf. A052386, A052379, A080674, A029858, A000918.

%Y Row n=6 of A228275.

%K easy,nonn

%O 0,2

%A _Alexandre Wajnberg_, Apr 25 2005

%E More terms from _Harvey P. Dale_, Jul 24 2012