%I #6 Mar 04 2024 08:47:48
%S 1,1,1,1,3,1,7,9,19,13,55,21,131,157,303,317,1039,393,2471,2505,5643,
%T 6145,19235,7413,40235,51905,110435,110683,359141,45877,764159,
%U 1077437,2253143,2251065,6699111,2200709,16009783,20505321,43172899,29699143,125396929
%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 n's in L_n.
%H Rémy Sigrist, <a href="/A370857/a370857.gp.txt">PARI program</a>
%F a(p) = (Sum_{k = 1, p-1} a(k)) - 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 1 (1, 2)
%e 3 1 (1, 3, 2)
%e 4 1 (1, 4, 3, 2)
%e 5 3 (1, 5, 4, 5, 3, 5, 2)
%e 6 1 (1, 6, 5, 4, 5, 3, 5, 2)
%e 7 7 (1, 7, 6, 7, 5, 7, 4, 7, 5, 7, 3, 7, 5, 7, 2)
%o (PARI) See Links section.
%Y Cf. A049456, A370858 (partials sums).
%K nonn
%O 1,5
%A _Rémy Sigrist_, Mar 03 2024