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.

This page as a plain text file.
%I A385254 #32 Aug 08 2025 04:05:01
%S A385254 0,1,2,6,18,26,70,82,222,642,1902,5682,17022,51042,59778,59958,77774,
%T A385254 107258,268870,285010,361086,930666,1084314,1498134,3813282,5053994,
%U A385254 13240150,14183598,15487758,15579122,18418666,18622506,23809998,58728474,64572254,65013058
%N A385254 Distinct terms in A386369.
%C A385254 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.
%H A385254 David A. Corneth, <a href="/A385254/b385254.txt">Table of n, a(n) for n = 1..1018</a>
%H A385254 David A. Corneth, <a href="/A385254/a385254.gp.txt">PARI program</a>
%e A385254 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:
%e A385254    1 | s - 3, 6 | s + 3
%e A385254    2 | s - 3, 3 | s + 3
%e A385254    3 | s - 3, 2 | s + 3
%e A385254    6 | s - 3, 1 | s + 3
%e A385254 Solving for smallest t > 6 gives s = 9. So 6*(k-6) = 9^2 - 9 = 72 and so k = 18.
%t A385254 Module[{s = 0, a = 0}, Table[If[IntegerQ[Sqrt[s += a]], a = k-1, Nothing], {k, 10^5}]]
%o A385254 (PARI) \\ See Corneth link
%Y A385254 Cf. A386369.
%K A385254 nonn
%O A385254 1,3
%A A385254 _David A. Corneth_ and _Paolo Xausa_, Jul 29 2025
%E A385254 More terms from _Michael De Vlieger_, Jul 29 2025