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.

A370858 Let L_1 = (1) and L_2 = (1, 2); for any n > 2, L_n is obtained by inserting one n between each pair of consecutive terms of L_{n-1} coprime to n; a(n) gives the number of terms in L_n.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 15, 24, 43, 56, 111, 132, 263, 420, 723, 1040, 2079, 2472, 4943, 7448, 13091, 19236, 38471, 45884, 86119, 138024, 248459, 359142, 718283, 764160, 1528319, 2605756, 4858899, 7109964, 13809075, 16009784, 32019567, 52524888, 95697787, 125396930
Offset: 1

Views

Author

Rémy Sigrist, Mar 03 2024

Keywords

Examples

			The first terms, alongside the corresponding lists, are:
  n  a(n)  L n
  -  ----  ---------------------------------------------
  1     1  (1                                          )
  2     2  (1,                                        2)
  3     3  (1,                            3,          2)
  4     4  (1,                4,          3,          2)
  5     7  (1,          5,    4,    5,    3,    5,    2)
  6     8  (1,    6,    5,    4,    5,    3,    5,    2)
  7    15  (1, 7, 6, 7, 5, 7, 4, 7, 5, 7, 3, 7, 5, 7, 2)
		

Crossrefs

Cf. A370857 (first differences).

Programs

  • PARI
    See Links section.

Formula

a(p) = 2*a(p-1) - 1 for any odd prime number p.