login
Smallest k>=1 such that A067128(n+k) - A067128(n) is in A067128 or a(n)=0 if there is no such k.
3

%I #12 Apr 15 2024 05:00:29

%S 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,1,1,1,1,1,1,1,1,1,

%T 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,1,1,1,1,1,1,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,2

%N Smallest k>=1 such that A067128(n+k) - A067128(n) is in A067128 or a(n)=0 if there is no such k.

%C For n=151, the required k, if it exists, should be >9800. So one can conjecture that a(151) is the first zero term.

%p A272901 := proc(n)

%p local k;

%p for k from 1 do

%p if isA067128(A067128(n+k)-A067128(n)) then

%p return k;

%p end if;

%p end do:

%p end proc:

%p for n from 1 do

%p printf("%d %d\n",n,A272901(n)) ;

%p end do: # _R. J. Mathar_, Apr 15 2024

%Y Cf. A067128, A272879.

%K nonn

%O 1,47

%A _Vladimir Shevelev_ and _Peter J. C. Moses_, May 09 2016