login
a(n) = 6^n + n.
6

%I #25 Feb 13 2024 02:55:54

%S 1,7,38,219,1300,7781,46662,279943,1679624,10077705,60466186,

%T 362797067,2176782348,13060694029,78364164110,470184984591,

%U 2821109907472,16926659444753,101559956668434,609359740010515,3656158440062996,21936950640377877,131621703842267158

%N a(n) = 6^n + n.

%C After 7, the next prime of this form has 238 digits (see A058828). - _Bruno Berselli_, Jun 18 2013

%H Vincenzo Librandi, <a href="/A226200/b226200.txt">Table of n, a(n) for n = 0..300</a>

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

%F G.f.: (-1+x+5*x^2)/((6*x-1)*(x-1)^2).

%F a(n) = 8*a(n-1)-13*a(n-2)+6*a(n-3).

%t Table[6^n + n, {n, 0, 30}] (* or *) CoefficientList[Series[(-1 + x + 5 x^2) / ((6 x - 1) (x - 1)^2), {x, 0, 30}], x]

%o (Magma) [6^n+n: n in [0..30]]; /* or */ I:=[1, 7, 38]; [n le 3 select I[n] else 8*Self(n-1)-13*Self(n-2)+6*Self(n-3): n in [1..30]];

%o (PARI) a(n)=6^n+n \\ _Charles R Greathouse IV_, Oct 07 2015

%Y Cf. numbers of the form k^n+n: A006127 (k=2), A104743 (k=3), A158879 (k=4), A104745 (k=5), this sequence (k=6), A226199 (k=7), A226201 (k=8), A226202 (k=9), A081552 (k=10), A226737 (k=11).

%Y Cf. A199320 (first differences).

%K nonn,easy

%O 0,2

%A _Vincenzo Librandi_, Jun 16 2013