OFFSET
1,2
COMMENTS
Conjecture: sequence is infinite.
Conjecture: all terms are divisible by 4. There are no counterexamples <= 10^9.
LINKS
Jianing Song, Table of n, a(n) for n = 1..2048 (all terms <= 10^9)
FORMULA
Conjecture: for n >= 2, a(2n-1) = ceiling(a(n) * (3+2*sqrt(2))), a(2n) = a(2n-1) + 4. This is correct for the first 2048 terms (all terms <= 10^9).
Conjectured explicit formula: if the binary expansion of n-1 is n-1 = 2^(e_0) + 2^(e_1) + ... + 2^(e_k), then a(n) = 4*(A001109(1+(e_0)) + A001109(1+(e_1)) + ... + A001109(1+(e_k))). For example, since 28-1 = 27 = 2^0 + 2^1 + 2^3 + 2^4, a(28) = 4*(A001109(1) + A001109(2) + A001109(4) + A001109(5)) = 5600.
EXAMPLE
MATHEMATICA
Join[{0}, Position[Accumulate@ Table[(-1)^Floor[k*(Sqrt[2] - 1)], {k, 1, 30000}], 0] // Flatten] (* Amiram Eldar, Oct 11 2021 *)
PROG
(PARI) list(lim) = my(Sum=-1, v=[]); for(k=0, lim, Sum+=(-1)^(sqrtint(2*k^2)-k); if(Sum==0, v=concat(v, k))); v
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Oct 10 2021
STATUS
approved