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.

A229742 a(n) = A071585(n) - A071766(n).

Original entry on oeis.org

0, 1, 2, 1, 3, 3, 1, 2, 4, 5, 4, 5, 1, 2, 3, 3, 5, 7, 7, 8, 5, 7, 7, 8, 1, 2, 3, 3, 4, 5, 4, 5, 6, 9, 10, 11, 9, 12, 11, 13, 6, 9, 10, 11, 9, 12, 11, 13, 1, 2, 3, 3, 4, 5, 4, 5, 5, 7, 7, 8, 5, 7, 7, 8, 7, 11, 13, 14, 13, 17, 15, 18, 11, 16, 17, 19, 14
Offset: 0

Views

Author

N. J. A. Sloane, Oct 05 2013, at the suggestion of Kevin Ryde

Keywords

Comments

From Yosu Yurramendi, Jun 30 2014: (Start)
If the terms (n>0) are written as an array (left-aligned fashion):
1,
2,1,
3,3, 1, 2,
4,5, 4, 5,1, 2, 3, 3,
5,7, 7, 8,5, 7, 7, 8,1,2, 3, 3,4, 5, 4, 5,
6,9,10,11,9,12,11,13,6,9,10,11,9,12,11,13,1,2,3,3,4,5,4,5,5,7,7,8,5,7,7,8,
then the sum of the k-th row is 3^(k-1) and each column is an arithmetic sequence. The differences of the arithmetic sequences gives the sequence A071585 (a(2^(p+1)+k) - a(2^p+k) = A071585(k), p = 0,1,2,..., k = 0,1,2,...,2^p-1).
The first terms of each column give A071766. The second terms of each column give A086593. So, A086593(n) = A071585(n) + A071766(n).
If the rows (n>0) are written in a right-aligned fashion:
1,
2,1,
3,3,1,2,
4,5,4,5,1,2,3,3,
5,7,7,8,5,7,7,8,1,2,3,3,4,5,4,5,
6,9,10,11,9,12,11,13,6,9,10,11,9,12,11,13,1,2,3,3,4,5,4,5,5,7,7,8,5,7,7,8,
then each column is a Fibonacci sequence (a(2^(p+2)+k) = a(2^(p+1)+k) + a(2^p+k) p = 0,1,2,..., k = 0,1,2,...,2^p-1, with a_k(1) = A071585(k) and a_k(2) = A071766(k) being the first two terms of each column sequence). (End)

Examples

			A229742/A071766 = 0, 1, 2, 1/2, 3, 3/2, 1/3, 2/3, 4, 5/2, 4/3, 5/3, 1/4, 2/5, 3/4, 3/5, 5, 7/2, 7/3, 8/3, 5/4, 7/5, 7/4, 8/5, ... (this is the HCS form of the Stern-Brocot tree).
		

Crossrefs

Programs

  • R
    blocklevel <- 6 # arbitrary
    a <- 1
    for(m in 0:blocklevel) for(k in 0:(2^(m-1)-1)){
      a[2^(m+1)+k]             <- a[2^m+k] + a[2^m+2^(m-1)+k]
      a[2^(m+1)+2^(m-1)+k]     <- a[2^(m+1)+k]
      a[2^(m+1)+2^m+k]         <- a[2^m+2^(m-1)+k]
      a[2^(m+1)+2^m+2^(m-1)+k] <- a[2^m+k]
    }
    a
    # Yosu Yurramendi, Jul 11 2014

Formula

From Yosu Yurramendi, May 26 2019: (Start)
a(2^(m+1)+2^m+k) = A071585( k)
a(2^(m+1) +k) = A071585(2^m+k), m >= 0, 0 <= k < 2^m. (End)
a(n) = A002487(A059893(A006068(n))) = A002487(1+A059893(A233279(n))), n > 0. - Yosu Yurramendi, Sep 29 2021