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.

A378842 Number of compositions (ordered partitions) of n into reciprocals of positive integers <= n.

This page as a plain text file.
%I A378842 #17 Dec 22 2024 13:08:51
%S A378842 1,1,5,154,127459,1218599617,2319241469466200,32824171395278825785183,
%T A378842 115384552858168166552304749413033,
%U A378842 22529589324775724210737089575811718669447945,1255772217551224641521320538899160332818484462756697922572,885355014578065534254256068634855343582928219947780981811219956595305584
%N A378842 Number of compositions (ordered partitions) of n into reciprocals of positive integers <= n.
%H A378842 Alois P. Heinz, <a href="/A378842/b378842.txt">Table of n, a(n) for n = 0..15</a>
%e A378842 a(2) = 5 because we have [1/2, 1/2, 1/2, 1/2], [1/2, 1/2, 1], [1/2, 1, 1/2], [1, 1/2, 1/2] and [1, 1].
%p A378842 b:= proc(n, r) option remember; `if`(r=0, 1,
%p A378842       add(`if`(r*j<1, 0, b(n, r-1/j)), j=1..n))
%p A378842     end:
%p A378842 a:= n-> b(n$2):
%p A378842 seq(a(n), n=0..10);  # _Alois P. Heinz_, Dec 12 2024
%o A378842 (Python)
%o A378842 from functools import lru_cache
%o A378842 from fractions import Fraction
%o A378842 def A378842(n):
%o A378842     @lru_cache(maxsize=None)
%o A378842     def f(r): return 1 if r==0 else sum(f(r-Fraction(1,j)) for j in range(int(Fraction(1,r))+(r.numerator!=1),n+1))
%o A378842     return f(n) # _Chai Wah Wu_, Dec 14 2024
%Y A378842 Cf. A020473, A038034, A208480.
%K A378842 nonn
%O A378842 0,3
%A A378842 _Ilya Gutkovskiy_, Dec 09 2024
%E A378842 More terms from _Alois P. Heinz_, Dec 12 2024