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.

User: Hubert W. Westwood

Hubert W. Westwood's wiki page.

Hubert W. Westwood has authored 1 sequences.

A361672 a(1) = a(2) = 1; for n > 2, a(n) = a(n-2) + a(n-1) + n if a(n-1) and n are coprime, otherwise a(n) = a(n-1)/gcd(a(n-1), n).

Original entry on oeis.org

1, 1, 5, 10, 2, 1, 10, 5, 24, 12, 47, 71, 131, 216, 72, 9, 98, 49, 166, 83, 270, 135, 428, 107, 560, 280, 867, 1175, 2071, 3276, 5378, 2689, 8100, 4050, 810, 45, 892, 446, 1377, 1863, 3281, 5186, 8510, 4255, 851, 37, 935, 1020, 2004, 1002, 334, 167, 554, 277, 886
Offset: 1

Author

Hubert W. Westwood, Mar 20 2023

Keywords

Programs

  • Magma
    a:=[1, 1]; for n in [3..50] do if Gcd(a[n-1], n) eq 1 then Append(~a, a[n-2] + a[n-1] + n); else Append(~a, a[n-1] div Gcd(a[n-1], n)); end if; end for; [] cat a;
  • Mathematica
    a[1]=a[2]=1; a[n_]:=a[n]=If[GCD[a[n-1],n]==1,a[n-2]+a[n-1]+n,a[n-1]/GCD[a[n-1],n]]; Array[a,55] (* Stefano Spezia, Mar 20 2023 *)