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.

A379612 a(n) = (n + 1)^(n - 1) + (n + 1)^(n - 2), by convention a(1) = 1.

Original entry on oeis.org

2, 1, 4, 20, 150, 1512, 19208, 294912, 5314410, 110000000, 2572306572, 67077144576, 1930018885886, 60743477544960, 2075941406250000, 76561193665298432, 3030800878069216722, 128186171713071710208, 5768828271352423353620, 275251200000000000000000, 13879377432727741655370342
Offset: 0

Views

Author

Peter Luschny, Dec 27 2024

Keywords

Crossrefs

Cf. A379611.

Programs

  • Magma
    A379612:= func< n | n le 1 select 2-n else (n+2)*(n+1)^(n-2) >;
    [A379612(n): n in [0..30]]; // G. C. Greubel, Mar 18 2025
    
  • Maple
    a := n -> ifelse(n=1, 1, (n + 1)^(n - 1) + (n + 1)^(n - 2)): seq(a(n), n = 0..20);
  • Mathematica
    Table[If[n == 1, 1, (n + 1)^(n - 1) + (n + 1)^(n - 2)], {n, 0, 20}] (* Michael De Vlieger, Dec 27 2024 *)
  • SageMath
    def A379612(n): return 2-n if n<2 else (n+2)*(n+1)^(n-2)
    print([A379612(n) for n in range(31)]) # G. C. Greubel, Mar 18 2025

Formula

a(n) = (n + 2)*(n + 1)^(n - 2) if n != 1.
E.g.f.: (-1/(2*x))*( (W(-x) + 2)^2 + x^2 - 4 ), W(x) = Lambert W function. - G. C. Greubel, Mar 18 2025