login
Kim-sums: "Kimberling sums" K_n + K_6.
1

%I #9 Dec 21 2023 04:00:14

%S 5,15,18,20,23,26,28,31,12,36,39,41,44,47,49,52,54,57,60,62,65,25,70,

%T 73,75,78,81,83,86,33,91,94,96,99,102,104,107,109,112,115,117,120,46,

%U 125,128,130,133,136,138,141,143,146,149,151,154,59,159,162,164,167,170,172

%N Kim-sums: "Kimberling sums" K_n + K_6.

%D Posting to math-fun mailing list Jan 10 1997.

%p Ki := proc(n,i)

%p option remember;

%p local phi ;

%p phi := (1+sqrt(5))/2 ;

%p if i= 0 then

%p n;

%p elif i=1 then

%p floor((n+1)*phi) ;

%p else

%p procname(n,i-1)+procname(n,i-2) ;

%p end if;

%p end proc:

%p Kisum := proc(n,m)

%p local ks,a,i;

%p ks := [seq( Ki(n,i)+Ki(m,i),i=0..5)] ;

%p for i from 0 to 2 do

%p for a from 0 do

%p if Ki(a,0) = ks[i+1] and Ki(a,1) = ks[i+2] then

%p return a;

%p end if;

%p if Ki(a,0) > ks[i+1] then

%p break;

%p end if;

%p end do:

%p end do:

%p end proc:

%p A022417 := proc(n)

%p if n = 0 then

%p 5;

%p else

%p Kisum(n-1,5) ;

%p end if;

%p end proc:

%p seq(A022417(n),n=0..80) ; # _R. J. Mathar_, Sep 03 2016

%K nonn

%O 0,1

%A _Marc LeBrun_