login
a(n) counts all integers k in [2,floor(sqrt(n))] such that the number of divisors d>1 of n-k with k|(n-d) equals A188550(n).
1

%I #15 Mar 27 2017 15:34:10

%S 1,1,1,1,1,1,1,2,2,2,1,1,2,1,1,2,2,1,1,2,3,1,1,1,1,1,1,1,1,1,1,1,1,1,

%T 1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,3,2,1,1,1,1,1,1,6,1,1,1,1,1,3,1,2,2,3,

%U 2,1,1,1,1,1,1,4,2,2,1,1,1,1,1,1,2,3,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,3,1,1

%N a(n) counts all integers k in [2,floor(sqrt(n))] such that the number of divisors d>1 of n-k with k|(n-d) equals A188550(n).

%H Alois P. Heinz, <a href="/A188795/b188795.txt">Table of n, a(n) for n = 4..10000</a>

%p with(numtheory):

%p a:= proc(n) option remember; local c, h, k, m;

%p m, c:= 0, 0;

%p for k from 2 to floor(sqrt(n)) do

%p h:= nops(select(x-> irem(x, k)=0,

%p [seq (n-d, d=divisors(n-k) minus{1})]));

%p if h=m then c:=c+1 elif h>m then m, c:= h, 1 fi

%p od; c

%p end:

%p seq(a(n), n=4..120); # _Alois P. Heinz_, Apr 10 2011

%t b[n_] := Max @ Table[Length @ Select[Table[n-d, {d, Divisors[n-k] // Rest} ], Mod[#, k] == 0&], {k, 2, Floor[Sqrt[n]]}];

%t a[n_] := a[n] = Count[Range[2, Floor[Sqrt[n]]], k_ /; Count[Rest @ Divisors[n-k], d_ /; Divisible[n-d, k]] == b[n]];

%t Table[a[n], {n, 4, 120}] (* _Jean-François Alcover_, Mar 27 2017, after _Alois P. Heinz_ *)

%Y Cf. A188550, A188579, A188794.

%K nonn

%O 4,8

%A _Vladimir Shevelev_, Apr 10 2011