%I #35 Jan 06 2023 20:54:31
%S 318,557,692,729,2226,2437,2776,3209,4436,5336,5549,5718,5956,6068,
%T 6141,6353,6958,7045,7046,7338,7345,7643,7865,8261,8409,9153,9178,
%U 9242,9544,9569,9664,9894,9999,10174,10889,12389,12434,13497,13516,16308,18695,19707,21940,21954,22535
%N Numbers k that are a substring of xPy where k=concatenation(x,y) and xPy is the number of permutations A008279(x,y).
%C If n and d are two nonnegative integers, and d <= n, then the number of permutations is obtained by the formula nPd = n!/(n-d)!.
%e 318 is present in 31P8 (= 318073392000 = A008279(31, 8)).
%e 557 is present in 55P7 (= 1022755734000 = A008279(55, 7)).
%e 692 is present in 69P2 (= 4692 = A008279(69, 2)).
%o (Python)
%o import math
%o def is_valid_sequence_number(n):
%o num_str = str(n)
%o length = len(num_str)
%o for count in range(math.ceil(length / 2), length):
%o if num_str in str(
%o math.perm(int(num_str[:count]), int(num_str[-(length - count) :]))
%o ):
%o return True
%o return False
%o A359012 = []
%o for num in range(10, 10**4):
%o if is_valid_sequence_number(num):
%o A359012.append(num)
%o (PARI) T(n,k) = n!/(n-k)!; \\ A008279
%o isok(k) = my(d=digits(k), s=Str(k), d1, d2); for (i=1, #d-1, d1=fromdigits(Vec(d, i)); d2=fromdigits(vector(#d-i, k, d[i+k])); if ((d1 >= d2) && (#strsplit(Str(T(d1,d2)), s) > 1), return(1));); \\ _Michel Marcus_, Dec 12 2022
%Y Cf. A008279.
%K nonn,base
%O 1,1
%A _John Samuel_, Dec 11 2022