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.

User: Oliver Pechenik

Oliver Pechenik's wiki page.

Oliver Pechenik has authored 4 sequences.

A319864 Exponents of the final nontrivial entry of the iterated Stern sequence; a(n) = log_2 min{s^k(n) : k > 0, s^k(n) > 1}, where s(n) = A002487(n).

Original entry on oeis.org

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

Author

Oliver Pechenik, Sep 29 2018

Keywords

Comments

Let s(n) = A002487(n). Since s(n) < n for n > 1, iterating A002487 from any starting point eventually yields the fixed point 1 = s(1). Since s^-1(1) consists of the powers of 2, min{s^k(n) : k > 0, s^k(n) > 1} is a nontrivial power of 2 for any n > 1. Hence, the entries of this sequence are integers.
Since a(2^m) = m, every positive integer appears in this sequence.
Question: What is the asymptotic density of the number 1 in this sequence? Of the first 10^6 entries, more than 74% are 1.

Examples

			Letting s(m) = A002487(m), we have s(7) = 3, s(3) = 2, and s(2) = 1. Hence, a(7) = log_2(2) = 1.
		

Crossrefs

Cf. A002487.

Programs

  • Mathematica
    s[n_] := If[n<2, n, If[EvenQ[n], s[n/2], s[(n-1)/2] + s[(n+1)/2]]];  a[n_] := Module[{nn = s[n]}, If[nn==1, Log2[n], a[nn]]]; Array[a, 100, 2] (* Amiram Eldar, Nov 22 2018 *)
  • PARI
    s(n) = if( n<2, n>0, s(n\2) + if( n%2, s(n\2 + 1))); \\ A002487
    a(n) = while((nn = s(n)) != 1, n = nn); valuation(n, 2); \\ Michel Marcus, Nov 23 2018
  • Python
    from math import log
    def s(n): return n if n<2 else s(n//2) if n%2==0 else s((n-1)//2)+s((n+1)//2)
    def a(n): nn = s(n); return int(log(n,2)) if nn==1 else a(nn)
    print([a(n) for n in range(2, 100)])
    
  • Python
    from functools import reduce
    def A319864(n):
        while (m:=sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0)))) > 1:
            n = m
        return n.bit_length()-1 # Chai Wah Wu, May 18 2023
    

A097981 Cell populations in the development of the 2 X 2 square with the 2D cellular automaton rule seeds (/2).

Original entry on oeis.org

4, 8, 12, 16, 24, 32, 52, 40, 56, 72, 72, 92, 128, 140, 136, 160, 152, 200, 244, 236, 264, 232, 268, 360, 316, 416, 320, 384, 436, 412, 500, 492, 500, 524, 680, 584, 744, 700, 764, 884, 896, 748, 1056, 864, 888, 992, 1036, 1060, 1296, 1268, 1436, 1408, 1472
Offset: 0

Author

Oliver Pechenik, Sep 07 2004

Keywords

Examples

			a(0) = 4 because the 2 X 2 square contains 4 cells. a(1) = 8 because 8 cells are neighbors of exactly 2 of the original 4 cells. a(2) = 12 because 12 cells are neighbors of exactly 2 of the previous 8 cells.
		

Crossrefs

Extensions

Offset changed by Eric M. Schmidt, Mar 10 2013

A097995 Cell populations in the development of the 1 X 5 cell pattern (I-pentomino) with the 2D cellular automaton rule "Seeds" (/2).

Original entry on oeis.org

5, 4, 6, 11, 16, 24, 26, 14, 15, 20, 28, 16, 16, 24, 16, 24, 38, 64, 62, 75, 72, 60, 68, 62, 106, 90, 106, 90, 82, 106, 93, 114, 120, 94, 136, 152, 174, 202, 221, 252, 216, 232, 246, 270, 320, 312, 358, 372, 360, 384, 364, 486, 414, 460, 592, 568, 618, 640, 712, 645
Offset: 0

Author

Oliver Pechenik, Sep 08 2004

Keywords

Examples

			a(0) = 5 because the 1 X 5 row contains 5 cells. a(1) = 4 because 4 cells are neighbors of exactly 2 of the original 5 cells. a(2) = 6 because 6 cells are neighbors of exactly 2 of the previous 4 cells.
		

Crossrefs

Extensions

Offset changed by Eric M. Schmidt, Mar 10 2013

A097996 Cell populations in the development of the L-pentomino with the 2D cellular automaton rule "Seeds" (/2).

Original entry on oeis.org

5, 5, 7, 11, 17, 17, 30, 32, 26, 26, 43, 41, 37, 40, 71, 56, 54, 54, 69, 81, 84, 104, 109, 96, 114, 123, 142, 128, 134, 141, 172, 182, 216, 224, 239, 255, 283, 265, 351, 304, 358, 370, 411, 411, 407, 434, 470, 488, 514, 556, 567, 568, 597, 657, 659, 704, 739, 793
Offset: 0

Author

Oliver Pechenik, Sep 08 2004

Keywords

Examples

			a(1)= 5 because the L-pentomino contains 5 cells. a(2)= 5 because 5 cells are neighbors (in a Moore neighborhood) of exactly 2 of the original 5 cells. a(3)= 7 because 7 cells are neighbors of exactly 2 of the previous 5 cells.
		

Crossrefs

Extensions

Offset changed by Eric M. Schmidt, Mar 10 2013