OFFSET
1,3
MATHEMATICA
Table[Length@Select[Permutations@Range@n, PrimeQ@Denominator@FromContinuedFraction@#&], {n, 9}] (* Giorgos Kalogeropoulos, Sep 22 2021 *)
PROG
(Python)
from itertools import permutations
from sympy import isprime
from sympy.ntheory.continued_fraction import continued_fraction_reduce
def A078432(n): return sum(1 for p in permutations(range(1, n+1)) if isprime(continued_fraction_reduce(p).q)) # Chai Wah Wu, Sep 22 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Reiner Martin, Dec 30 2002
EXTENSIONS
a(10)-a(13) from Robert Gerbicz, Nov 27 2010
STATUS
approved