OFFSET
0,9
LINKS
Thomas Scheuerle, Table of n, a(n) for n = 0..16383
Thomas Scheuerle, Logarithmic histogram over a(0)..a(2^26).
Thomas Scheuerle, blue: log(a(3*2^n)-a(2*2^n)) for n = 3..23, a black reference line was added. The difference between black and blue shows some nontrivial deviation from exponential growth.
FORMULA
a(2^n+2) = 0, for n > 1.
a(2*2^n+1..2*2^(n+1)-1) = a(2*2^(n+1)+1..3*2^(n+1)-1) but a(2*2^n) <= a(3*2^n).
a(2^n+1+k) = a(k+1) - a(k), for 0 <= k < 2^n-1 and n > 0. This property holds also if we replace "a" in this formula by the sequence of forward differences of any order if n is greater than the order of the forward differences.
EXAMPLE
The defining partial sums as sequence blocks 0..2^k-1 begin
sums 1, 1, 1, 0, 1, 0, 0, -1, ...
^ \---/ \---------/
blocks a(0) a(0..1) a(0..3)
The formula results in repeats of terms of the sequence itself in blocks,
n=0..1: 1, 0,
n=2: 0,
n=3..4: -1, 1,
n=5..8: -1, 0, -1, 2,
n=9..16: -1, 0, -1, 2, -2, 1, -1, 2,
n=17..32: -1, 0, -1, 2, -2, 1, -1, 3, -3, 1, -1, 3, -4, 3, -2, 2,
Terms at n=9..15 repeat in the next row at n=17..23 since A053645 in the formula "drops" each latter n in the same way as each former n, and in general successive rows repeat excluding the last term.
Each of these blocks has zero sum.
PROG
(PARI)
vectorA(numiter) = {my(v=[1]); for(k=0, numiter, v=concat(v, v-concat(0, v[1..#v-1]))); v[1+#v/2..#v]}
(MATLAB)
function [ out ] = A380855( numberOfIterations )
v = [1];
for k=1:numberOfIterations
v = [v, v(1), diff(v)];
end
out = v(1+end/2:end);
end
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Thomas Scheuerle, Feb 06 2025
STATUS
approved
