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.

A087740 a(n) = 1 + abs(A004001(A005185(n)) - A005185(A004001(n))).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 3, 3, 3, 2, 2, 2, 4, 1, 2, 2, 2, 2, 1, 2, 1, 2, 3, 3, 1, 1, 1, 3, 3, 1, 3, 2, 1, 1, 2, 1, 5, 5, 5, 5, 2, 2, 2, 2, 7, 1, 2, 2, 3, 3, 3, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 3, 2, 2, 6, 7, 7, 4, 3, 4, 4, 2, 2, 2, 4, 4, 3, 7, 3, 3, 2, 6, 3, 1, 2, 3, 1, 3, 2, 1, 3, 1, 1, 3, 1, 3, 2, 9, 5, 9, 10
Offset: 1

Views

Author

Roger L. Bagula, Oct 01 2003

Keywords

Comments

A "commutator" between the Hofstadter A005185 sequence and the Conway-Hofstadter A004001 sequence.

Crossrefs

Cf. A004001, A005185, A284019 (compare the scatter plots).
Cf. also A286560.

Programs

  • Mathematica
    Conway[n_Integer?Positive] := Conway[n] =Conway[Conway[n-1]] + Conway[n - Conway[n-1]] Conway[1] = Conway[2] = 1 Hofstadter[n_Integer?Positive] := Hofstadter[n] = Hofstadter[n - Hofstadter[n-1]] + Hofstadter[n - Hofstadter[n-2]] Hofstadter[1] = Hofstadter[2] = 1 digits=200 a=Table[1+Abs[Conway[Hofstadter[n]]-Hofstadter[Conway[n]]], {n, 1, digits}]
  • Scheme
    (define (A087740 n) (+ 1 (abs (- (A004001 (A005185 n)) (A005185 (A004001 n)))))) ;; Scheme-code for A004001 and A005185 given under those entries.

Extensions

Data section extended to 120 terms by Antti Karttunen, May 22 2017