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.

A022905 a(n) = M(n) + m(n) for n >= 2, where M(n) = max{ a(i) + a(n-i): i = 1..n-1 }, m(n) = min{ a(i) + a(n-i): i = 1..n-1 }.

Original entry on oeis.org

1, 4, 10, 19, 34, 55, 85, 124, 178, 247, 337, 448, 589, 760, 970, 1219, 1522, 1879, 2305, 2800, 3385, 4060, 4846, 5743, 6781, 7960, 9310, 10831, 12562, 14503, 16693, 19132, 21874, 24919, 28321, 32080, 36265, 40876, 45982, 51583, 57769
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 1,
          a(n-1)+1+a(floor(n/2))+a(ceil(n/2)))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 17 2013
  • Mathematica
    a[n_] := a[n] = If[n==1, 1, a[n-1]+1+a[Floor[n/2]]+a[Ceiling[n/2]]]; Array[a,100] (* Jean-François Alcover, Aug 07 2017, after Alois P. Heinz *)
  • Python
    from itertools import islice
    from collections import deque
    def A022905_gen(): # generator of terms
        aqueue, f, b, a = deque([2]), True, 1, 2
        yield 1
        while True:
            a += b
            aqueue.append(a)
            if f:
                yield (3*a-1)//2
                b = aqueue.popleft()
            f = not f
    A022905_list = list(islice(A022905_gen(),40)) # Chai Wah Wu, Jun 08 2022

Formula

a(n) = n + Sum_{k=2..n} A022907(k).
a(n+1) = 1+3*Sum_{k=1..n} A033485(k). - Philippe Deléham, Jun 17 2010
a(n) = a(n-1) + 1 + a(floor(n/2)) + a(ceiling(n/2)) for n>1, a(1) = 1. - Alois P. Heinz, Sep 17 2013
a(n+1) = (3*A033485(2n+1)-1)/2. - Chai Wah Wu, Jun 08 2022