cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A349145 Number of ordered n-tuples (x_1, x_2, x_3, ..., x_n) such that Sum_{k=1..n} k/x_k is an integer and x_k is an integer between 1 and n for 1 <= k <= n.

This page as a plain text file.
%I A349145 #32 Jul 15 2023 14:02:05
%S A349145 1,1,2,8,43,207,2391,15539,182078,2070189,35850460,338695058,
%T A349145 10609401552,115445915555
%N A349145 Number of ordered n-tuples (x_1, x_2, x_3, ..., x_n) such that Sum_{k=1..n} k/x_k is an integer and x_k is an integer between 1 and n for 1 <= k <= n.
%e A349145 1/1 + 2/1 = 3 and 3 is an integer.
%e A349145 1/1 + 2/2 = 2 and 2 is an integer.
%e A349145 1/2 + 2/1 = 5/2.
%e A349145 1/2 + 2/2 = 3/2.
%e A349145 So a(2) = 2.
%o A349145 (Ruby)
%o A349145 def A(n)
%o A349145   return 1 if n == 0
%o A349145   cnt = 0
%o A349145   (1..n).to_a.repeated_permutation(n){|i|
%o A349145     cnt += 1 if (1..n).inject(0){|s, j| s + j / i[j - 1].to_r}.denominator == 1
%o A349145   }
%o A349145   cnt
%o A349145 end
%o A349145 def A349145(n)
%o A349145   (0..n).map{|i| A(i)}
%o A349145 end
%o A349145 p A349145(6)
%o A349145 (Python)
%o A349145 from fractions import Fraction
%o A349145 from itertools import product
%o A349145 def A349145(n): return sum(1 for d in product(range(1,n+1),repeat=n) if sum(Fraction(i+1,j) for i, j in enumerate(d)).denominator == 1) # _Chai Wah Wu_, Nov 09 2021
%Y A349145 Cf. A073090, A349146.
%K A349145 nonn,more
%O A349145 0,3
%A A349145 _Seiichi Manyama_, Nov 08 2021
%E A349145 a(10)-a(13) from _Alois P. Heinz_, Nov 08 2021