login
a(n) = k if the first appearance of n in A077618 is at index k, or 0 if k does not appear in A077618.
1

%I #12 Oct 24 2017 02:29:54

%S 4,1,6,78,102,130,66,30,510,1218,4002,4578,390,14326,14430,858,690,

%T 330,1722,5106,11310,1110,13090,3666,46662,10230,44574,210,9570,4290,

%U 32010,29946,30498,13398,9282,15810,11730,25194,12090,36890,103730,194370,239190,86430,79230,6006,359310,85470,2730,211470

%N a(n) = k if the first appearance of n in A077618 is at index k, or 0 if k does not appear in A077618.

%C Conjecture: all positive integers appear in A077618, so a(n) is never 0.

%H Robert Israel, <a href="/A291056/b291056.txt">Table of n, a(n) for n = 0..168</a>

%e a(3) = 78 because A077618(78)=3 and this is the first appearance of 3 in A077618.

%p N:= 10^6: # to get all terms before the first where a(n) > N

%p M:= map(numtheory:-bigomega, [$1..N]):

%p S:= map(numtheory:-issqrfree, [$1..N]):

%p f:= proc(n) local m,k,t;

%p if not S[n] then return 0 fi;

%p m:= M[n];

%p t:= 1;

%p for k from n-1 to 1 by -1 do

%p if M[k] = m then

%p if S[k] then return t

%p else t:= t+1

%p fi;

%p fi

%p od;

%p t

%p end proc;

%p R:= map(f, [$1..N]):

%p A:= NULL:

%p for i from 0 do

%p j:= ListTools:-Search(i,R);

%p if j = 0 then break fi;

%p A:= A,j

%p od:

%p A;

%K nonn

%O 0,1

%A _Robert Israel_, Oct 20 2017