A295838 Largest value corresponding to a string of n printable ASCII characters.
0, 126, 32382, 8289918, 2122219134, 543288098430, 139081753198206, 35604928818740862, 9114861777597660798, 2333404615065001164414, 597351581456640298090110
Offset: 0
Examples
The lexicographically last 2-character printable ASCII string is "~~", which is 7E7E in hexadecimal or 32382 in decimal, thus a(2) = 32382.
Links
- Iain Fox, Table of n, a(n) for n = 0..415
- Index entries for linear recurrences with constant coefficients, signature (257,-256).
Crossrefs
Cf. A175824.
Programs
-
Magma
[(42/85)*(256^n - 1) : n in [0..20]]; // Wesley Ivan Hurt, Nov 29 2017
-
Maple
A295838:=n->(42/85)*(256^n - 1): seq(A295838(n), n=0..20); # Wesley Ivan Hurt, Nov 29 2017
-
Mathematica
Array[(42/85) (256^# - 1) &, 11, 0] (* Michael De Vlieger, Dec 11 2017 *) CoefficientList[Series[126 x/((1 - 256 x) (1 - x)), {x, 0, 10}], x] (* Michael De Vlieger, Dec 11 2017 *)
-
PARI
a(n) = 42/85*(256^n-1) \\ Iain Fox, Nov 28 2017
-
PARI
first(n) = Vec(126*x/((1-256*x)*(1-x)) + O(x^n), -n) \\ Iain Fox, Nov 28 2017
Formula
a(n) = (42/85)*(256^n - 1).
From Iain Fox, Nov 28 2017: (Start)
G.f.: 126*x/((1-256*x)*(1-x)).
E.g.f.: 42/85*(e^(256*x)-e^x).
a(n) = 42/85 * A175824(n).
(End)
For n > 0, a(n) = 256*a(n-1) + 126. - Jon E. Schoenfield, Nov 29 2017
For n > 1, a(n) = 257*a(n-1) - 256*a(n-2). - Iain Fox, Jan 02 2018
Comments