OFFSET
0,3
COMMENTS
Partial sums of powers of 256 (A133752), q-integers for q=256.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..400
Quynh Nguyen, Jean Pedersen, and Hien T. Vu, New Integer Sequences Arising From 3-Period Folding Numbers, Vol. 19 (2016), Article 16.3.1. Cites this sequence.
Index entries for linear recurrences with constant coefficients, signature (257,-256).
FORMULA
a(n) = floor(256^n/255).
From Vincenzo Librandi, Nov 07 2012: (Start)
G.f.: x/((1 - x)*(1 - 256*x)).
a(n) = 257*a(n-1) - 256*a(n-2). (End)
E.g.f.: exp(x)*(exp(255*x) - 1)/255. - Stefano Spezia, Mar 23 2023
MATHEMATICA
LinearRecurrence[{257, -256}, {0, 1}, 30] (* Vincenzo Librandi, Nov 07 2012 *)
PROG
(PARI) A218723(n)=256^n\255
(Magma) [n le 2 select n-1 else 257*Self(n-1) - 256*Self(n-2): n in [1..20]]; // Vincenzo Librandi, Nov 07 2012
(Python)
def A218723(n): return (1<<(n<<3))//255 # Chai Wah Wu, Nov 10 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, Nov 04 2012
STATUS
approved