Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #18 Jun 22 2024 08:01:55
%S 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,1,
%T 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,
%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,3
%N Number of distinct representations A005244(n) = A005244(i)*A005244(j)-1 with i < j.
%C A139129 gives the smallest terms in A005244 having exactly n representations.
%H Robert Israel, <a href="/A139128/b139128.txt">Table of n, a(n) for n = 1..10000</a> (n = 1 to 500 from R. Zumkeller)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HofstadterSequences.html">Hofstadter Sequences</a>
%H <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>
%e A005244(28) = 129: a(28) = #{26*5-1,65*2-1} = 2.
%p R:= [2,3]: count:= 2:
%p for i from 4 while count < 10000 do
%p found:= false;
%p for j from 1 while R[j]^2 < i+1 do
%p if i mod R[j] = R[j]-1 and ListTools:-BinarySearch(R,(i+1)/R[j]) <> 0 then
%p found:= true; break
%p fi
%p od;
%p if found then R:= [op(R),i]; count:= count+1;
%p od:
%p f:= proc(n) local t,i,j,x,L;
%p x:= R[n]+1:
%p L:= R[1..n-1];
%p t:= 0:
%p for i from 1 while R[i]^2 < x do
%p if x mod R[i] = 0 and ListTools:-BinarySearch(L,x/R[i]) <> 0 then t:= t+1 fi
%p od;
%p t
%p end proc:
%p map(f, [$1..10000]); # _Robert Israel_, Jun 21 2024
%K nonn
%O 1,28
%A _Reinhard Zumkeller_, Apr 09 2008
%E a(2) corrected and definition clarified by _Robert Israel_, Jun 21 2024