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.

A330581 a(0) = 2; thereafter a(n) = a(n - 1)^n + 1.

Original entry on oeis.org

2, 3, 10, 1001, 1004006004002, 1020191144865623440455270145683555422808365843606721760320033
Offset: 0

Views

Author

David Johnson-Davies, Dec 18 2019

Keywords

Comments

Note that this could be extended backwards to a(-1), and any nonzero value x for a(-1) would work, since x^0 + 1 = 2.

Crossrefs

Programs

  • Lisp
    (defun a (n) (+ (if (zerop n) 1 (expt (a (- n 1)) n)) 1))
    
  • Maple
    a:= proc(n) option remember; `if`(n<0, %,
          1 + a(n-1)^n)
        end:
    seq(a(n), n=0..5);  # Alois P. Heinz, Dec 18 2019
  • Mathematica
    a[0] = 2; a[n_] := a[n] = a[n - 1]^n + 1; Array[a, 6, 0] (* Amiram Eldar, Dec 19 2019 *)
    nxt[{n_,a_}]:={n+1,a^(n+1)+1}; NestList[nxt,{0,2},5][[;;,2]] (* Harvey P. Dale, Dec 10 2023 *)
  • PARI
    a(n) = if(n==0, 2, a(n-1)^n+1) \\ Felix Fröhlich, Dec 18 2019

Extensions

Edited by N. J. A. Sloane, Dec 27 2019