OFFSET
1,1
FORMULA
a(n) = 511 + (-1)^n - 2*n.
G.f.: -4*(-127 + 128*n^2)/((n+1)*(n-1)^2).
EXAMPLE
For n=5, a(5) = 500, i.e., there are 500 possible L-bit words in which up to k bits can be perturbed, leading to a change in the word's unsigned value by 5, for L=8 and k=7.
For n=254, a(254) = 4, for L=8 and k=7.
For n=255, a(255) = 0, i.e., there is no L-bit word in which up to k bit positions can be perturbed to lead to a change in the unsigned value of the word by 255, for L=8 and k=7.
CROSSREFS
KEYWORD
nonn
AUTHOR
Phillip Stanley-Marbell (phillip.stanleymarbell(AT)gmail.com), Dec 06 2008, Dec 08 2008
STATUS
approved