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.

A272727 a(0)=0; thereafter a(n+1) is the number of coincidences between the sequence so far (a(0), ..., a(n)) and its reverse (a(n), ..., a(0)).

Original entry on oeis.org

0, 1, 0, 3, 0, 3, 0, 5, 0, 7, 0, 7, 0, 7, 0, 9, 0, 9, 0, 11, 0, 13, 0, 15, 0, 15, 0, 15, 0, 15, 0, 17, 0, 19, 0, 19, 0, 19, 0, 21, 0, 21, 0, 23, 0, 23, 0, 25, 0, 27, 0, 29, 0, 31, 0, 31, 0, 31, 0, 31, 0, 31, 0, 33, 0, 33, 0, 35, 0, 37, 0, 39, 0, 39, 0, 39, 0, 39, 0, 41, 0, 43
Offset: 0

Views

Author

Ivan Neretin, May 05 2016

Keywords

Comments

a(2n-1) is positive and odd.
a(2n+1) - a(2n-1) is always either 0 or 2.
The number of repetitions of the value 2n-1 is A272729(n).

Examples

			A one-element series [0] coincides with its own reverse, hence a(1)=1.
[0,1] and [1,0] differ in every term, hence a(2)=0.
[0,1,0] is its own reverse, hence a(3)=3.
[0,1,0,3] and [3,0,1,0] differ in every term, hence a(4)=0.
[0,1,0,3,0] and [0,3,0,1,0] coincide in three terms, hence a(5)=3.
		

Crossrefs

Programs

  • Mathematica
    Nest[Append[#, Count[# - Reverse[#], x_ /; x == 0]] &, {0}, 81]

Formula

a(2n)=0.
a(2n-1)=A272728(n)+n.