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.

A285779 Parity index: number of integers z with 1 <= z <= n for which A010060(z) = A010060(n), negated if A010060(n) = 1.

This page as a plain text file.
%I A285779 #27 Jan 14 2018 23:00:52
%S A285779 0,-1,-2,1,-3,2,3,-4,-5,4,5,-6,6,-7,-8,7,-9,8,9,-10,10,-11,-12,11,12,
%T A285779 -13,-14,13,-15,14,15,-16,-17,16,17,-18,18,-19,-20,19,20,-21,-22,21,
%U A285779 -23,22,23,-24,24,-25,-26,25,-27,26,27,-28,-29,28,29,-30,30,-31,-32,31,-33,32,33,-34,34,-35,-36,35,36
%N A285779 Parity index: number of integers z with 1 <= z <= n for which A010060(z) = A010060(n), negated if A010060(n) = 1.
%C A285779 Signs are given by A010059 or A010060, the Thue-Morse sequence. Here, zero has positive sign. Like A130472, this sequence maps the natural numbers to the integers. Positive terms are one less than the corresponding term in A008619.
%C A285779 This was a test problem for seqr, a genetic programming integer sequence recognizer, which discovered a method for generating terms of the sequence given the bits of n in descending order.
%C A285779 Iterating over the bits of n in ascending order yields a sequence with more irregular behavior, differing in absolute value by up to 2: 0, -1, -2, 0, -3, +3, +3, +2, -5, 5, 5, ...
%C A285779 Consecutive terms of A285779 usually differ in absolute value by 1 or 2, but consecutive terms differing only in sign occur irregularly. This happens first for a(11) = -6 and a(12) = +6.
%H A285779 G. C. Greubel, <a href="/A285779/b285779.txt">Table of n, a(n) for n = 0..10000</a>
%H A285779 <a href="https://oeis.org/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the integers</a>
%t A285779 Function[s, Table[(2 Boole[# == 0] - 1) Count[Take[s, n], z_ /; z == #] &@ s[[n]], {n, 0, Length@ s}]]@ Array[ThueMorse, 72] (* _Michael De Vlieger_, May 10 2017, Version 10.2 *)
%o A285779 (PARI) a(n) = {my(v = 1); forstep(b = length(binary(n)) - 1, 0, -1, if(bittest(n, b), v = bitxor(-v, 2^b)); ); v = bitnegimply(v, 1); return(v / 2)}
%Y A285779 Cf. A010059, A010060, A130472, A008619
%K A285779 sign,easy
%O A285779 0,3
%A A285779 _Reikku Kulon_, Apr 25 2017