%I #18 Mar 12 2024 11:39:52
%S 0,1,1,3,1,3,1,3,7,8,1,7,1,10,7,11,1,6,1,4,0,14,1,19,21,16,7,12,1,23,
%T 1,27,29,3,25,4,1,3,7,32,1,25,1,30,13,26,1,3,36,28,41,32,1,6,24,32,26,
%U 32,1,31,1,3,12,59,20,2,1,19,53,7,1,40,1,3,37,19,33,6,1,16,34
%N Expansion of l.g.f. L(x) = log(G(x)) - x*G(x) where G(x) is the o.g.f. of A370718.
%C It appears that a(p) = 1 for prime p.
%C Where does the number 5 first appear in this sequence?
%H Paul D. Hanna, <a href="/A370719/b370719.txt">Table of n, a(n) for n = 1..5001</a>
%F L.g.f. L(x) = Sum_{n>=1} a(n)*x^n/n satisfies the following formulas, in which G(x) is the o.g.f. of A370718.
%F (1) L(x) = log(G(x)) - x*G(x).
%F (2) a(n) = [x^(n-1)] G'(x)/G(x) - n*A370718(n-1) such that 0 <= a(n) < n for n >= 1.
%e L.g.f.: L(x) = x^2/2 + x^3/3 + 3*x^4/4 + x^5/5 + 3*x^6/6 + x^7/7 + 3*x^8/8 + 7*x^9/9 + 8*x^10/10 + x^11/11 + 7*x^12/12 + ...
%e such that L(x) = log(G(x)) - x*G(x), where
%e G(x) = 1 + x + 2*x^2 + 4*x^3 + 9*x^4 + 20*x^5 + 47*x^6 + 113*x^7 + 279*x^8 + 702*x^9 + 1793*x^10 + ... + A370718(n)*x^n + ...
%e and
%e log(G(x)) = x + 3*x^2/2 + 7*x^3/3 + 19*x^4/4 + 46*x^5/5 + 123*x^6/6 + 330*x^7/7 + 907*x^8/8 + 2518*x^9/9 + 7028*x^10/10 + ...
%e FREQUENCY OF INTEGERS.
%e a(p) = 1 for prime p holds for at least the initial 5000 terms;
%e a(n) = 1 when n is nonprime at positions [121, 592, 675, 961, 1548, ...].
%e These integers do not appear in the initial 5000 terms: [5, 54, 99, 111, 127, 171, 174, 175, 177, 178, 181, 196, 199, 213, 216, 217, 228, 230, 235, 254, 260, 274, 276, 277, 289, 298, ...].
%e Here is the frequency of some integers in the initial 5000 terms.
%e 0: 4 times, at positions [1, 21, 1106, 1335, ...].
%e 1: 674 times, at positions [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ...].
%e 2: 6 times, at positions [66, 153, 333, 1448, 1903, 4239, ...].
%e 3: 198 times, at positions [4, 6, 8, 34, 38, 48, 62, 74, 82, ...].
%e 4: 3 times, at positions [20, 36, 187, ...].
%e 5: 0 times - where does 5 appear in this sequence?
%e 6: 4 times, at positions [18, 54, 78, 312, ...].
%e 7: 77 times, at positions [9, 12, 15, 27, 39, 70, 87, 159, ...].
%e 8: 5 times, at positions [10, 130, 232, 620, 2419, ...].
%e 9: 2 times, at positions [500, 3834, ...].
%e 10: 6 times, at positions [14, 184, 1245, 1352, 1552, 4810, ...].
%e 11: 4 times, at positions [16, 165, 1314, 1491, ...].
%e 12: 5 times, at positions [28, 63, 371, 375, 2964, ...].
%e 13: 3 times, at positions [45, 455, 1599, ...].
%e 14: 2 times, at positions [22, 376, ...].
%e 15: 3 times, at positions [1196, 2225, 4009, ...].
%e 16: 2 times, at positions [26, 80, ...].
%e 19: 60 times, at positions [24, 68, 76, 124, 164, 172, 180, 212, ...].
%e 46: 37 times, at positions [185, 215, 265, 295, 335, 365, 415, ...].
%e ...
%o (PARI) {a(n) = my(L=[0],A=[1]); for(i=1,n, L = concat(L,0);
%o A = concat(A,0); F = exp( x*Ser(A) + sum(n=1,#L, L[n]*x^n/n) );
%o L[#L] = (#L - (#L)*polcoeff(F,#L))%(#L);
%o A = Vec(F +O(x^#A)); ); L[n]}
%o for(n=1,80,print1(a(n),", "))
%Y Cf. A370718.
%K nonn
%O 1,4
%A _Paul D. Hanna_, Mar 01 2024