A318236 a(n) = (3*2^(4*n+3) + 1)/5.
5, 77, 1229, 19661, 314573, 5033165, 80530637, 1288490189, 20615843021, 329853488333, 5277655813325, 84442493013197, 1351079888211149, 21617278211378381, 345876451382054093, 5534023222112865485, 88544371553805847757, 1416709944860893564109, 22667359117774297025741
Offset: 0
Examples
The smallest solution to 5*x == 1 (mod 8) is x = (3*2^3 + 1)/5 = 5. The smallest solution to 5*x == 1 (mod 128) is x = (3*2^7 + 1)/5 = 77.
Links
- Jianing Song, Table of n, a(n) for n = 0..200
- Index entries for linear recurrences with constant coefficients, signature (17,-16).
Crossrefs
Programs
-
Magma
[(3*2^(4*n + 3) + 1)/5: n in [0..20]]; // Vincenzo Librandi, Aug 24 2018
-
Mathematica
Table[(3 2^(4 n + 3) + 1) / 5, {n, 0, 20}] (* Vincenzo Librandi, Aug 24 2018 *) LinearRecurrence[{17,-16},{5,77},20] (* Harvey P. Dale, Sep 25 2020 *)
-
PARI
a(n) = (3*2^(4*n + 3) + 1)/5
-
Python
def A318236(n): return (3*(1<<(n<<2)+3)+1)//5 # Chai Wah Wu, Jul 29 2022
Formula
O.g.f.: (5 - 8*x)/((1 - x)*(1 - 16*x)).
E.g.f.: (24*exp(16*x) + exp(x))/5.
a(0) = 5, a(1) = 77; for n>1, a(n) = 17*a(n-1) - 16*a(n-2).
Comments