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.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 17, 23, 37, 59, 89, 139, 227, 361, 587, 947, 1531, 2477, 4007, 6481, 10487, 16963, 27449, 44393, 71837, 116227, 188063, 304289, 492343, 796627, 1288967, 2085593, 3374557, 5460139, 8834689, 14294827, 23129507, 37424333, 60553837, 97978169
Offset: 0

Views

Author

Amrit Awasthi, Jun 05 2021

Keywords

Comments

First differs from A055500 at a(14).

Examples

			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.
		

Crossrefs

Cf. A055500.

Programs

  • Maple
    A[0]:= 1:
    A[1]:= 1: P:= 1:
    for n from 2 to 100 do
      for k from A[n-2]+A[n-1] by -1 do
        if igcd(k,P) = 1 then break fi
      od;
      A[n]:= k;
      P:= P*k;
    od:
    convert(A,list); # Robert Israel, Oct 23 2024
  • Mathematica
    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 *)