

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)).


5



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


COMMENTS

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


LINKS

Ivan Neretin, Table of n, a(n) for n = 0..8191


FORMULA

a(2n)=0.
a(2n1)=A272728(n)+n.


EXAMPLE

A oneelement 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.


MATHEMATICA

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


CROSSREFS

Cf. A272728, A272729.
Sequence in context: A292130 A291971 A240923 * A333791 A323135 A100258
Adjacent sequences: A272724 A272725 A272726 * A272728 A272729 A272730


KEYWORD

nonn


AUTHOR

Ivan Neretin, May 05 2016


STATUS

approved



