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.

A330385 Add the odd terms and subtract the even ones, the result must always be a square. This is the lexicographically earliest sequence of distinct positive integers with this property.

This page as a plain text file.
%I A330385 #11 Dec 12 2019 14:59:01
%S A330385 1,3,4,9,7,12,5,8,15,16,25,11,13,24,39,17,19,21,23,44,36,28,20,33,40,
%T A330385 27,32,45,48,35,85,72,51,64,133,87,60,29,31,105,123,84,41,43,141,96,
%U A330385 47,49,159,57,59,61,63,65,67,69,71,73,75,77,79,81,83,164,156
%N A330385 Add the odd terms and subtract the even ones, the result must always be a square. This is the lexicographically earliest sequence of distinct positive integers with this property.
%C A330385 This sequence is a variant of A329544.
%C A330385 All terms belong to A042965.
%H A330385 Rémy Sigrist, <a href="/A330385/b330385.txt">Table of n, a(n) for n = 1..10000</a>
%H A330385 Rémy Sigrist, <a href="/A330385/a330385.png">Scatterplot of the first 5000000 terms</a>
%e A330385 The first terms, alongside the corresponding running totals, are:
%e A330385   n   a(n)  t(n)
%e A330385   --  ----  --------
%e A330385    1     1   1 = 1^2
%e A330385    2     3   4 = 2^2
%e A330385    3     4   0 = 0^2
%e A330385    4     9   9 = 3^2
%e A330385    5     7  16 = 4^2
%e A330385    6    12   4 = 2^2
%e A330385    7     5   9 = 3^2
%e A330385    8     8   1 = 1^2
%e A330385    9    15  16 = 4^2
%e A330385   10    16   0 = 0^2
%e A330385   11    25  25 = 5^2
%o A330385 (PARI) s=t=0; for (n=1, 65, for (v=1, oo, if (!bittest(s,v) && issquare(u=t-v*(-1)^v), print1 (v", "); s+=2^v; t=u; break)))
%Y A330385 Cf. A000290, A042965, A329544, A330386 (running totals).
%K A330385 nonn,look
%O A330385 1,2
%A A330385 _Rémy Sigrist_, Dec 12 2019