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.

Previous Showing 11-13 of 13 results.

A050061 a(n) = a(n-1) + a(m) for n >= 4, where m = 2^(p+1) + 2 - n and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = 1, a(2) = 3, and a(3) = 2.

Original entry on oeis.org

1, 3, 2, 5, 6, 11, 13, 16, 17, 33, 46, 57, 63, 68, 70, 73, 74, 147, 217, 285, 348, 405, 451, 484, 501, 517, 530, 541, 547, 552, 554, 557, 558, 1115, 1669, 2221, 2768, 3309, 3839, 4356, 4857, 5341, 5792, 6197, 6545, 6830, 7047, 7194
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. similar sequences with different initial conditions: A050025 (1,1,1), A050029 (1,1,2), A050033 (1,1,3), A050037 (1,1,4), A050041 (1,2,1), A050045 (1,2,2), A050049 (1,2,3), A050053 (1,2,4), A050057 (1,3,1), A050065 (1,3,3), A050069 (1,3,4).

Programs

  • Maple
    a := proc(n) option remember;
    `if`(n < 4, [1, 3, 2][n], a(n - 1) + a(2^ceil(log[2](n - 1)) + 2 - n)); end proc;
    seq(a(n), n = 1..50); # Petros Hadjicostas, Nov 11 2019
  • Mathematica
    Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 3, 2}, Flatten@Table[k, {n, 5}, {k, 2^n, 1, -1}]] (* Ivan Neretin, Sep 08 2015 *)

Extensions

Name edited by Petros Hadjicostas, Nov 11 2019

A050065 a(n) = a(n-1) + a(m) for n >= 4, where m = 2^(p+1) + 2 - n and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = 1 and a(2) = a(3) = 3.

Original entry on oeis.org

1, 3, 3, 6, 7, 13, 16, 19, 20, 39, 55, 68, 75, 81, 84, 87, 88, 175, 259, 340, 415, 483, 538, 577, 597, 616, 632, 645, 652, 658, 661, 664, 665, 1329, 1990, 2648, 3300, 3945, 4577, 5193, 5790, 6367, 6905, 7388, 7803, 8143, 8402, 8577
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. similar sequences with different initial conditions: A050025 (1,1,1), A050029 (1,1,2), A050033 (1,1,3), A050037 (1,1,4), A050041 (1,2,1), A050045 (1,2,2), A050049 (1,2,3), A050053 (1,2,4), A050057 (1,3,1), A050061 (1,3,2), A050069 (1,3,4).

Programs

  • Maple
    a := proc(n) option remember;
    `if`(n < 4, [1, 3, 3][n], a(n - 1) + a(Bits:-Iff(n - 2, n - 2) + 3 - n)); end proc;
    seq(a(n), n = 1 .. 48); # Petros Hadjicostas, Nov 08 2019
  • Mathematica
    Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 3, 3}, Flatten@Table[k, {n, 5}, {k, 2^n, 1, -1}]] (* Ivan Neretin, Sep 08 2015 *)

Extensions

Name edited by Petros Hadjicostas, Nov 08 2019

A096116 a(1)=1, if n=(2^k)+1, a(n) = k+2, otherwise a(n) = 2+A000523(n-1)+a(2+A035327(n-1)).

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 7, 6, 5, 11, 12, 14, 9, 10, 8, 7, 6, 13, 14, 16, 15, 20, 18, 17, 11, 12, 13, 15, 10, 11, 9, 8, 7, 15, 16, 18, 17, 22, 20, 19, 18, 24, 25, 27, 22, 23, 21, 20, 13, 14, 15, 17, 16, 21, 19, 18, 12, 13, 14, 16, 11, 12, 10, 9, 8, 17, 18, 20, 19, 24, 22, 21, 20, 26
Offset: 1

Views

Author

Amarnath Murthy, Jun 30 2004

Keywords

Comments

Each n > 1 occurs A025147(n) times in the sequence.

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, If[BitAnd[n - 1, n - 2] == 0, Log2[n - 1] + 2, 2 + Floor[Log2[n - 1]] + a[[2 + BitXor[n - 1, 2^Ceiling[Log2[n]] - 1]]]]], {n, 2, 74}]; a (* Ivan Neretin, Jun 24 2016 *)
  • Scheme
    (define (A096116 n) (cond ((= 1 n) 1) ((pow2? (- n 1)) (+ 2 (A000523 (- n 1)))) (else (+ 2 (A000523 (- n 1)) (A096116 (+ 2 (A035327 (- n 1))))))))
    (define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1)))))
    ;; Antti Karttunen, Aug 25 2006

Extensions

Edited and extended by Antti Karttunen, Aug 25 2006
Previous Showing 11-13 of 13 results.