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.

A347309 a(n) = gcd(b(n-1)+1, b(n)), where b is A347113.

This page as a plain text file.
%I A347309 #25 May 06 2022 09:51:33
%S A347309 2,5,11,23,47,5,2,3,7,3,4,3,13,9,5,2,19,13,7,8,17,5,3,5,31,21,11,3,4,
%T A347309 3,37,25,2,29,59,17,3,2,41,83,167,5,3,2,43,29,2,3,7,19,5,23,2,3,5,61,
%U A347309 41,7,2,53,107,43,11,7,2,67,3,4,5,71,13,3,2,3,73,3,5,2,79,53,2,7
%N A347309 a(n) = gcd(b(n-1)+1, b(n)), where b is A347113.
%C A347309 The definition of A347113 forbids a(n) to be 1.
%H A347309 Michel Marcus, <a href="/A347309/b347309.txt">Table of n, a(n) for n = 2..10000</a> (terms 2..1000 from N. J. A. Sloane)
%p A347309 b:= proc() true end:
%p A347309 g:= proc(n) option remember; local j, k; j:= g(n-1)+1;
%p A347309       for k from 2 do if b(k) and k<>j and igcd(k, j)>1
%p A347309         then b(k):= false; return k fi od
%p A347309     end: g(1):= 1:
%p A347309 a:= n-> igcd(g(n-1)+1, g(n)):
%p A347309 seq(a(n), n=2..100);  # _Alois P. Heinz_, Sep 02 2021
%t A347309 b[_] = True;
%t A347309 g[n_] := g[n] = Module[{j = g[n - 1] + 1, k},
%t A347309      For[k = 2, True, k++, If[ b[k] && k != j && GCD[k, j] > 1,
%t A347309           b[k] = False; Return[k]]]];
%t A347309 g[1] = 1;
%t A347309 a[n_] := GCD[g[n - 1] + 1, g[n]];
%t A347309 Table[a[n], {n, 2, 100}] (* _Jean-François Alcover_, May 06 2022, after _Alois P. Heinz_ *)
%Y A347309 Cf. A347113.
%K A347309 nonn
%O A347309 2,1
%A A347309 _N. J. A. Sloane_, Sep 01 2021