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.

A067396 a(n) is the position of the n-th occurrence of the pair "2,2" in A067395 (the first difference sequence of A067368).

Original entry on oeis.org

4, 13, 22, 31, 36, 41, 50, 59, 68, 77, 86, 95, 104, 109, 114, 123, 132, 141, 150, 159, 168, 177, 182, 187, 196, 205, 214, 223, 232, 241, 250, 255, 260, 269, 278, 287, 292, 297, 306, 315, 324, 329, 334, 343, 352, 361, 370, 379, 388, 397, 402, 407, 416, 425
Offset: 1

Views

Author

John W. Layman, Jan 22 2002

Keywords

Comments

A comparison of this sequence with A067368 suggests the following conjecture: a(n)=2*A067368(n)+n-1. This has been confirmed for several hundred terms.
Above conjecture is true, and it is same as conjecture in Formula section of A067368. - Altug Alkan, Sep 26 2018
The asymptotic density of this sequence is 1/8. - Amiram Eldar, May 31 2024

Examples

			A067395 begins {4,4,4,2,2,4,4,4,4,...}, so a(1)=4.
		

Crossrefs

Programs

  • Python
    def A067396(n):
        def f(x): return n+x-sum(((x>>i)-1>>1)+1 for i in range(0,x.bit_length(),3))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return (m<<2)+n-1 # Chai Wah Wu, Feb 17 2025