[go: up one dir, main page]

login
A335023
Ratios of consecutive terms of A334958.
0
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,3
COMMENTS
Conjecture: a(n) = 1 if and only if n+1 is prime.
FORMULA
a(n) = A334958(n+1)/A334958(n).
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 *)
PROG
(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
CROSSREFS
Sequence in context: A243146 A349440 A048671 * A205959 A318503 A328580
KEYWORD
nonn
AUTHOR
Petros Hadjicostas, May 19 2020
STATUS
approved