%I #4 Mar 04 2024 08:47:44
%S 1,2,3,4,7,8,15,24,43,56,111,132,263,420,723,1040,2079,2472,4943,7448,
%T 13091,19236,38471,45884,86119,138024,248459,359142,718283,764160,
%U 1528319,2605756,4858899,7109964,13809075,16009784,32019567,52524888,95697787,125396930
%N 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.
%H Rémy Sigrist, <a href="/A370858/a370858.gp.txt">PARI program</a>
%F a(p) = 2*a(p-1) - 1 for any odd prime number p.
%e The first terms, alongside the corresponding lists, are:
%e n a(n) L n
%e - ---- ---------------------------------------------
%e 1 1 (1 )
%e 2 2 (1, 2)
%e 3 3 (1, 3, 2)
%e 4 4 (1, 4, 3, 2)
%e 5 7 (1, 5, 4, 5, 3, 5, 2)
%e 6 8 (1, 6, 5, 4, 5, 3, 5, 2)
%e 7 15 (1, 7, 6, 7, 5, 7, 4, 7, 5, 7, 3, 7, 5, 7, 2)
%o (PARI) See Links section.
%Y Cf. A370857 (first differences).
%K nonn
%O 1,2
%A _Rémy Sigrist_, Mar 03 2024