OFFSET
1,1
COMMENTS
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)!.
EXAMPLE
PROG
(Python)
import math
def is_valid_sequence_number(n):
num_str = str(n)
length = len(num_str)
for count in range(math.ceil(length / 2), length):
if num_str in str(
math.perm(int(num_str[:count]), int(num_str[-(length - count) :]))
):
return True
return False
A359012 = []
for num in range(10, 10**4):
if is_valid_sequence_number(num):
A359012.append(num)
(PARI) T(n, k) = n!/(n-k)!; \\ A008279
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
John Samuel, Dec 11 2022
STATUS
approved