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.

A135688 a(n) = A004001(n)*a(n-1) + a(n-2), for n > 2, with a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 3, 7, 24, 103, 436, 1847, 9671, 59873, 428782, 3061347, 24919558, 202417811, 1644262046, 13356514179, 121852889657, 1231885410749, 13672592407896, 165302994305501, 1997308524073908, 26130313807266305, 367821701825802178
Offset: 1

Views

Author

Roger L. Bagula, Feb 19 2008

Keywords

Crossrefs

Programs

  • Mathematica
    HC[n_]:= HC[n]= If[n<3, Fibonacci[n], HC[HC[n-1]] +HC[n -HC[n-1]]]; (*A004001*)
    a[n_] := a[n] = If[n<3, 1, HC[n]*a[n-1] + a[n-2]];
    Table[a[n], {n, 40}]
  • Sage
    @cached_function
    def HC(n): # HC = A004001
        if (n<3): return fibonacci(n)
        else: return HC(HC(n-1)) +HC(n -HC(n-1))
    @CachedFunction
    def a(n): # A135688
        if (n<3): return 1
        else: return HC(n)*a(n-1) + a(n-2)
    [a(n) for n in (1..40)] # G. C. Greubel, Nov 25 2021

Formula

a(n) = A004001(n)*a(n-1) + a(n-2), for n > 2, with a(1) = a(2) = 1.

Extensions

Edited and corrected by Eric M. Schmidt, Dec 21 2014