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.

A281531 a(n) is the least numerator k such that the proper fraction k/n needs three or more terms as an Egyptian fraction, or 0 if no such numerator exists.

This page as a plain text file.
%I A281531 #25 Sep 08 2022 08:46:18
%S A281531 0,0,0,4,0,3,7,7,8,5,11,3,6,7,7,4,13,3,13,9,5,5,17,4,6,8,12,4,14,3,7,
%T A281531 5,8,11,17,3,6,9,17,4,18,3,7,11,7,5,21,3,8,7,11,4,13,9,13,7,7,7,28,3,
%U A281531 5,13,7,4,10,3,11,11,13,5,23,3,6,11,9,5,11,3,19
%N A281531 a(n) is the least numerator k such that the proper fraction k/n needs three or more terms as an Egyptian fraction, or 0 if no such numerator exists.
%C A281531 If n > 3 is prime, a(n)  = A007978(n+1). - _Robert Israel_, Dec 26 2019
%H A281531 Robert Israel, <a href="/A281531/b281531.txt">Table of n, a(n) for n = 2..10000</a>
%H A281531 <a href="/index/Ed#Egypt">Index entries for sequences related to Egyptian fractions</a>
%p A281531 f:= proc(n) option remember; local k,T;
%p A281531   T:= numtheory:-divisors(n^2);
%p A281531   for k from 2 to n-1 do
%p A281531     g:= igcd(k,n);
%p A281531     if g > 1 then
%p A281531        r:= procname(n/g);
%p A281531        if k = r*g then return k fi;
%p A281531     else
%p A281531        if not member(-n mod k,  T mod k) then return k fi
%p A281531     fi
%p A281531   od;
%p A281531 0
%p A281531 end proc;
%p A281531 map(f, [$2..100]); # _Robert Israel_, Dec 25 2019
%t A281531 a[n_] := a[n] = Module[{k, T}, T = Divisors[n^2]; For[k = 2, k <= n - 1, k++, g = GCD[k, n]; If[g > 1, r = a[n/g]; If[k == r g, Return [k]], If[FreeQ[Mod[T, k], Mod[-n, k]], Return [k]]]]; 0];
%t A281531 a /@ Range[2, 100] (* _Jean-François Alcover_, Oct 06 2020, after _Robert Israel_ *)
%o A281531 (Magma) lst:=[]; for n in [2..80] do for k in [1..n-1] do f:=k/n; x:=1; v:=0; if Numerator(f) eq 1 then v:=1; else while f lt 2/x do if Numerator(f-1/x) eq 1 then v:=1; break; end if; x+:=1; end while; end if; if v eq 0 then Append(~lst, k); break; end if; if k eq n-1 then Append(~lst, 0); end if; end for; end for; lst;
%Y A281531 Cf. A007978, A281530.
%K A281531 nonn
%O A281531 2,4
%A A281531 _Arkadiusz Wesolowski_, Jan 23 2017