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.

A385254 Distinct terms in A386369.

Original entry on oeis.org

0, 1, 2, 6, 18, 26, 70, 82, 222, 642, 1902, 5682, 17022, 51042, 59778, 59958, 77774, 107258, 268870, 285010, 361086, 930666, 1084314, 1498134, 3813282, 5053994, 13240150, 14183598, 15487758, 15579122, 18418666, 18622506, 23809998, 58728474, 64572254, 65013058
Offset: 1

Views

Author

David A. Corneth and Paolo Xausa, Jul 29 2025

Keywords

Comments

a(1) = 0. a(n) is the smallest positive integer > a(n-1) such that Sum_{m = 1..n-1} (a(m+1)-a(m))*a(m) is a perfect square.

Examples

			The first 6 terms of A386369 are 0, 1, 2, 2, 2, 2 which has partial sum 9. We have A386369(7) = 6. To find a(4) we look for the next term in A386369 that is larger than 6 i.e. solve 6*(k-6) + 9 = s^2 for some k. Rewrite gives 6*(k-6) = s^2 - 9 = (s-3)(s + 3). So we have 4 cases:
   1 | s - 3, 6 | s + 3
   2 | s - 3, 3 | s + 3
   3 | s - 3, 2 | s + 3
   6 | s - 3, 1 | s + 3
Solving for smallest t > 6 gives s = 9. So 6*(k-6) = 9^2 - 9 = 72 and so k = 18.
		

Crossrefs

Cf. A386369.

Programs

  • Mathematica
    Module[{s = 0, a = 0}, Table[If[IntegerQ[Sqrt[s += a]], a = k-1, Nothing], {k, 10^5}]]
  • PARI
    \\ See Corneth link

Extensions

More terms from Michael De Vlieger, Jul 29 2025