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.

A329982 a(1) = 0, and for n > 0, a(n+1) = k^2 - a(n) where k is the number of terms equal to a(n) among the first n terms.

This page as a plain text file.
%I A329982 #13 Nov 29 2019 12:35:32
%S A329982 0,1,0,4,-3,4,0,9,-8,9,-5,6,-5,9,0,16,-15,16,-12,13,-12,16,-7,8,-7,11,
%T A329982 -10,11,-7,16,0,25,-24,25,-21,22,-21,25,-16,17,-16,20,-19,20,-16,25,
%U A329982 -9,10,-9,13,-9,18,-17,18,-14,15,-14,18,-9,25,0,36,-35,36,-32
%N A329982 a(1) = 0, and for n > 0, a(n+1) = k^2 - a(n) where k is the number of terms equal to a(n) among the first n terms.
%C A329982 In other words, for n > 0, a(n+1) = o(n)^2 - a(n) where o is the ordinal transform of the sequence.
%H A329982 Rémy Sigrist, <a href="/A329982/b329982.txt">Table of n, a(n) for n = 1..10000</a>
%H A329982 Rémy Sigrist, <a href="/A329982/a329982.png">Scatterplot of the first 2^20 terms</a>
%e A329982 The first terms, alongside their ordinal transform, are:
%e A329982   n   a(n)  o(n)
%e A329982   --  ----  ----
%e A329982    1     0     1
%e A329982    2     1     1
%e A329982    3     0     2
%e A329982    4     4     1
%e A329982    5    -3     1
%e A329982    6     4     2
%e A329982    7     0     3
%e A329982    8     9     1
%e A329982    9    -8     1
%e A329982   10     9     2
%o A329982 (PARI) for (n=1, #(a=vector(65)), print1 (a[n]=if (n>1, sum(k=1, n-1, a[k]==a[n-1])^2-a[n-1])", "))
%Y A329982 See A329981 for similar sequences.
%K A329982 sign,look
%O A329982 1,4
%A A329982 _Rémy Sigrist_, Nov 26 2019