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.

This page as a plain text file.
%I A335023 #20 Jan 22 2025 11:40:21
%S A335023 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,
%T A335023 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,
%U A335023 55,56,57,58,1,60,1,62,63,32,65,66,1,68,69,70,1,72,1,74,375,76,847
%N A335023 Ratios of consecutive terms of A334958.
%C A335023 Conjecture: a(n) = 1 if and only if n+1 is prime.
%H A335023 Antti Karttunen, <a href="/A335023/b335023.txt">Table of n, a(n) for n = 1..20000</a>
%F A335023 a(n) = A334958(n+1)/A334958(n).
%p A335023 b:= proc(n) b(n):= (-(-1)^n/n +`if`(n=1, 0, b(n-1))) end:
%p A335023 g:= proc(n) g(n):= (f-> igcd(b(n)*f, f))(n!) end:
%p A335023 a:= n-> g(n+1)/g(n):
%p A335023 seq(a(n), n=1..80);  # _Alois P. Heinz_, May 20 2020
%t A335023 b[n_] := b[n] = -(-1)^n/n + If[n==1, 0, b[n-1]];
%t A335023 g[n_] := GCD[b[n] #, #]&[n!];
%t A335023 a[n_] := g[n+1]/g[n];
%t A335023 Array[a, 80] (* _Jean-François Alcover_, Nov 30 2020, after _Alois P. Heinz_ *)
%o A335023 (PARI) f(n) = n!*sum(k=2, n, (-1)^k/k); \\ A024168
%o A335023 g(n) = gcd(f(n+1), f(n)); \\ A334958
%o A335023 a(n) = g(n+1)/g(n); \\ _Michel Marcus_, May 20 2020
%Y A335023 Cf. A056612, A334958.
%K A335023 nonn
%O A335023 1,3
%A A335023 _Petros Hadjicostas_, May 19 2020