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.

A345020 a(0) = a(1) = 1, a(n) = largest natural number m <= a(n-1) + a(n-2) where gcd(m,a(k)) = 1 for all 1 < k <= n-1.

This page as a plain text file.
%I A345020 #21 Oct 23 2024 00:40:38
%S A345020 1,1,2,3,5,7,11,17,23,37,59,89,139,227,361,587,947,1531,2477,4007,
%T A345020 6481,10487,16963,27449,44393,71837,116227,188063,304289,492343,
%U A345020 796627,1288967,2085593,3374557,5460139,8834689,14294827,23129507,37424333,60553837,97978169
%N A345020 a(0) = a(1) = 1, a(n) = largest natural number m <= a(n-1) + a(n-2) where gcd(m,a(k)) = 1 for all 1 < k <= n-1.
%C A345020 First differs from A055500 at a(14).
%H A345020 Robert Israel, <a href="/A345020/b345020.txt">Table of n, a(n) for n = 0..4781</a>
%e A345020 a(5) = 7 because 7 is the largest number less than or equal to a(4) + a(3) = 8 which is coprime to all the previous terms of sequence.
%p A345020 A[0]:= 1:
%p A345020 A[1]:= 1: P:= 1:
%p A345020 for n from 2 to 100 do
%p A345020   for k from A[n-2]+A[n-1] by -1 do
%p A345020     if igcd(k,P) = 1 then break fi
%p A345020   od;
%p A345020   A[n]:= k;
%p A345020   P:= P*k;
%p A345020 od:
%p A345020 convert(A,list); # _Robert Israel_, Oct 23 2024
%t A345020 a[0] = a[1] = 1; a[n_] := a[n] = Module[{k = a[n - 1] + a[n - 2]}, While[! AllTrue[Range[2, n - 2], CoprimeQ[a[#], k] &], k--]; k]; Array[a, 50, 0] (* _Amiram Eldar_, Jun 05 2021 *)
%Y A345020 Cf. A055500.
%K A345020 nonn
%O A345020 0,3
%A A345020 _Amrit Awasthi_, Jun 05 2021