A385254 Distinct terms in A386369.
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
Keywords
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.
Links
- David A. Corneth, Table of n, a(n) for n = 1..1018
- David A. Corneth, PARI program
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
Comments