login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078432 Number of permutations p of 1,2,...,n such that the denominator of the continued fraction [p(1); p(2),...,p(n)] is prime. 3
0, 1, 4, 14, 32, 204, 994, 7526, 48636, 421392, 4018976, 41304726, 490878388 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
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
Sequence in context: A323723 A324042 A099590 * A124786 A322009 A228272
KEYWORD
nonn,more
AUTHOR
Reiner Martin, Dec 30 2002
EXTENSIONS
a(10)-a(13) from Robert Gerbicz, Nov 27 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:27 EDT 2024. Contains 371971 sequences. (Running on oeis4.)