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.

A119608 Let b(1)=0, b(2)= 1. b(2^m +k) = (b(2^m+1-k) + b(k))/2, 1 <= k <= 2^m, m >= 0. a(n) is numerator of b(n).

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 3, 1, 1, 7, 5, 3, 3, 5, 7, 1, 1, 15, 9, 7, 5, 11, 13, 3, 3, 13, 11, 5, 7, 9, 15, 1, 1, 31, 17, 15, 9, 23, 25, 7, 5, 27, 21, 11, 13, 19, 29, 3, 3, 29, 19, 13, 11, 21, 27, 5, 7, 25, 23, 9, 15, 17, 31, 1, 1, 63, 33, 31, 17, 47, 49, 15, 9, 55, 41, 23, 25, 39, 57, 7, 5, 59, 37
Offset: 1

Views

Author

Leroy Quet, Jun 04 2006

Keywords

Comments

Denominator of b(n), for n >= 2, is A053644(n-1).

Crossrefs

Cf. A053644.

Programs

  • Maple
    A119608 := proc (mmax) local a,b,m,k,bn,i; b := [0,1] ; for m from 1 to mmax do for k from 1 to 2^m do bn := (b[2^m+1-k]+b[k])/2 ; b := [op(b),bn] ; od ; od ; a := [] ; for i from 1 to nops(b) do a := [op(a),numer(b[i])] ; od ; RETURN(a) ; end: an := A119608(7) : for i from 1 to nops(an) do printf("%d,",an[i]) ; od ; # R. J. Mathar, Aug 06 2006
  • R
    maxlevel <- 8 # by choice
    b <- c(0,1)
    for(m in 1:maxlevel) for(k in 1:2^m) b[2^m +k] = (b[2^m+1-k] + b[k])/2
    d <- vector()
    for(m in 0:maxlevel) for(k in 0:(2^m-1)) d[2^m + k] <- 2^m; d <- c(0,d)
    a <- b*d
    a[1:100]
    # Yosu Yurramendi, Feb 05 2019
    
  • R
    a <- 1
    maxlevel <- 15 # by choice
    for(m in 1:5) {
      a[2^(m+1)-1] <- 1
      a[2^(m+1)  ] <- 1
      for(k in 1:(2^m-1)){
      a[2^(m+1)-1-k] <- a[2^m+k]
      a[2^(m+1)  +k] <- a[2^m+k]+2^(m-floor(log2(k)))*a[k]
    }}
    a <- c(0,a)
    a[1:128]
    # Yosu Yurramendi, Mar 13 2019

Formula

From Yosu Yurramendi, Mar 13 2019: (Start)
Without a(1) = 0, and shifting the terms one place left:
a(2^m) = 1, m >= 0;
a(2^(m+1)-1-k) = a(2^m+k), m >= 0, 0 < k < 2^m;
a(2^(m+1)+k) = a(2^m+k)+2^(m-floor(log_2(k)))*a(k), m >= 0, 0 < k < 2^m.
(End)

Extensions

More terms from R. J. Mathar, Aug 06 2006