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.

Showing 1-3 of 3 results.

A318928 Runs-resistance of binary representation of n.

Original entry on oeis.org

1, 2, 1, 3, 2, 3, 1, 3, 3, 2, 4, 2, 4, 3, 1, 3, 3, 5, 4, 4, 2, 5, 4, 3, 4, 4, 3, 3, 4, 3, 1, 3, 3, 5, 3, 3, 5, 4, 3, 4, 5, 2, 4, 3, 4, 5, 4, 3, 3, 3, 2, 4, 4, 3, 3, 2, 3, 4, 3, 3, 4, 3, 1, 3, 3, 5, 3, 3, 5, 3, 4, 3, 3, 5, 6, 4, 5, 3, 3, 4, 5, 4, 4, 4, 2, 5, 4, 5, 5, 4, 5, 5, 4, 5, 4
Offset: 1

Views

Author

N. J. A. Sloane, Sep 09 2018

Keywords

Comments

Following Lenormand (2003), we define the "runs-resistance" of a finite list L to be the number of times the RUNS transformation must be applied to L in order to reduce L to a list with a single element.
Here it is immaterial whether we read the binary representation of n from left to right or right to left.
The RUNS transformation must be applied at least once, in order to obtain a list, so a(n) >= 1.

Examples

			11 in binary is [1, 0, 1, 1],
which has runs of lengths [1, 1, 2],
which has runs of lengths [2, 1],
which has runs of lengths [1, 1],
which has a single run of length [2].
This took four steps, so a(11) = 4.
		

Crossrefs

See A319103 for an inverse, and A319417 and A319418 for records.
Ignoring the first digit gives A329870.
Cuts-resistance is A319416.
Compositions counted by runs-resistance are A329744.
Binary words counted by runs-resistance are A319411 and A329767.

Programs

  • Maple
    with(transforms);
    # compute Lenormand's "resistance" of a list
    resist:=proc(a) local ct,i,b;
    if whattype(a) <> list then ERROR("input must be a list"); fi:
    ct:=0; b:=a; for i from 1 to 100 do
    if nops(b)=1 then return(ct); fi;
    b:=RUNS(b); ct:=ct+1; od; end;
    a:=[1];
    for n from 2 to 100 do
    b:=convert(n,base,2);
    r:=resist(b);
    a:=[op(a),r];
    od:
  • Mathematica
    Table[If[n == 1, 1, Length[NestWhileList[Length/@Split[#] &, IntegerDigits[n, 2], Length[#] > 1 &]] - 1], {n, 50}] (* Gus Wiseman, Nov 25 2019 *)

Extensions

a(1) corrected by N. J. A. Sloane, Sep 20 2018

A319103 a(n) is the least k > 0 such that A318928(k) = n.

Original entry on oeis.org

1, 3, 2, 4, 11, 18, 75, 621, 9638, 1264052, 1294752365, 20699153586797, 43409394810283725529
Offset: 0

Views

Author

Rémy Sigrist, Sep 10 2018

Keywords

Comments

This sequence is well defined and infinite:
- for any n > 1, we can build a number m such that A318928(m) = 1 + A318928(n),
- let (b_1, ..., b_k) be the binary representation of n,
- let r_1 = 1, and for i = 1..k-1: r_{i+1} = r_i if b_{i+1} = b_i and r_{i+1} = 2 - r_i otherwise,
- the number m whose run lengths in binary representation are (r_1, ..., r_k) satisfies A318928(m) = 1 + A318928(n).
a(11) <= 42414573279593.
Here A318928(1) is considered to be 0, which differs from the current definition of A318928. However, I think it is quite natural to define A318928(1) to be 0. - Hiroaki Yamanouchi, Sep 22 2018

Examples

			The first terms of A318928, alongside the corresponding terms in this sequence, are:
  n   A318928(n)  Corresponding terms
  --  ----------  -------------------
   1           0  a(0) = 1
   2           2  a(2) = 2
   3           1  a(1) = 3
   4           3  a(3) = 4
   5           2
   6           3
   7           1
   8           3
   9           3
  10           2
  11           4  a(4) = 11
  12           2
  13           4
		

Crossrefs

Cf. A318928.
See A319417, A319418 for record values in A318928.

Programs

  • PARI
    See Links section.

Extensions

a(11)-a(12) from Hiroaki Yamanouchi, Sep 22 2018

A319417 Records in A318928.

Original entry on oeis.org

1, 2, 4, 11, 18, 75, 621, 9638, 1264052, 1294752365, 20699153586797, 43409394810283725529
Offset: 1

Views

Author

N. J. A. Sloane, Sep 21 2018

Keywords

Comments

It is very plausible that the next two terms are 1264052 and 1294752365, as in Rémy Sigrist's A319103, but that needs to be checked.

Crossrefs

Cf. A318928, A319103, A319418 (a(n) written in base 2).

Extensions

a(9)-a(10) from Rémy Sigrist's results, Sep 25 2018
a(11)-a(12) from Hiroaki Yamanouchi, Sep 25 2018
Showing 1-3 of 3 results.