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.

A335023 Ratios of consecutive terms of A334958.

Original entry on oeis.org

1, 1, 2, 1, 6, 1, 4, 3, 10, 1, 12, 1, 14, 75, 8, 1, 18, 1, 4, 21, 22, 1, 24, 5, 26, 9, 196, 1, 30, 1, 16, 33, 34, 5, 36, 1, 38, 39, 40, 1, 42, 1, 44, 45, 46, 1, 48, 7, 50, 51, 52, 1, 54, 55, 56, 57, 58, 1, 60, 1, 62, 63, 32, 65, 66, 1, 68, 69, 70, 1, 72, 1, 74, 375, 76, 847
Offset: 1

Views

Author

Petros Hadjicostas, May 19 2020

Keywords

Comments

Conjecture: a(n) = 1 if and only if n+1 is prime.

Crossrefs

Programs

  • Maple
    b:= proc(n) b(n):= (-(-1)^n/n +`if`(n=1, 0, b(n-1))) end:
    g:= proc(n) g(n):= (f-> igcd(b(n)*f, f))(n!) end:
    a:= n-> g(n+1)/g(n):
    seq(a(n), n=1..80);  # Alois P. Heinz, May 20 2020
  • Mathematica
    b[n_] := b[n] = -(-1)^n/n + If[n==1, 0, b[n-1]];
    g[n_] := GCD[b[n] #, #]&[n!];
    a[n_] := g[n+1]/g[n];
    Array[a, 80] (* Jean-François Alcover, Nov 30 2020, after Alois P. Heinz *)
  • PARI
    f(n) = n!*sum(k=2, n, (-1)^k/k); \\ A024168
    g(n) = gcd(f(n+1), f(n)); \\ A334958
    a(n) = g(n+1)/g(n); \\ Michel Marcus, May 20 2020

Formula

a(n) = A334958(n+1)/A334958(n).