cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A348299 Indices of 0 in A348295: numbers m such that Sum_{k=1..m} (-1)^(floor(k*(sqrt(2)-1))) = Sum_{k=1..m} (-1)^A097508(k) = 0.

Original entry on oeis.org

0, 4, 24, 28, 140, 144, 164, 168, 816, 820, 840, 844, 956, 960, 980, 984, 4756, 4760, 4780, 4784, 4896, 4900, 4920, 4924, 5572, 5576, 5596, 5600, 5712, 5716, 5736, 5740, 27720, 27724, 27744, 27748, 27860, 27864, 27884, 27888, 28536, 28540, 28560, 28564, 28676, 28680, 28700, 28704
Offset: 1

Views

Author

Jianing Song, Oct 10 2021

Keywords

Comments

Conjecture: sequence is infinite.
Conjecture: all terms are divisible by 4. There are no counterexamples <= 10^9.

Examples

			24 is a term: A097508(k) is even for k = 1, 2, 5, 6, 7, 10, 11, 12, 15, 16, 20, 21 and odd for k = 3, 4, 8, 9, 13, 14, 17, 18, 19, 22, 23, 24, so Sum_{k=1..24} (-1)^A097508(k) = 0.
		

Crossrefs

Programs

  • Mathematica
    Join[{0}, Position[Accumulate@ Table[(-1)^Floor[k*(Sqrt[2] - 1)], {k, 1, 30000}], 0] // Flatten] (* Amiram Eldar, Oct 11 2021 *)
  • 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

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.