

A171934


Backwards van Eck transform of A000010.


1



0, 1, 0, 1, 0, 2, 0, 3, 2, 2, 0, 2, 0, 5, 0, 1, 0, 4, 0, 4, 8, 11, 0, 4, 0, 5, 8, 2, 0, 6, 0, 15, 8, 2, 0, 8, 0, 11, 4, 6, 0, 6, 0, 11, 6, 23, 0, 8, 6, 6, 0, 7, 0, 16, 14, 4, 20, 29, 0, 12, 0, 31, 6, 13, 0, 16, 0, 4, 0, 14, 0, 2, 0, 11, 20, 2, 16, 6, 0, 12, 0, 7, 0, 6, 0, 37, 0, 6, 0, 6, 18, 23, 16, 47
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,6


COMMENTS

Given a sequence a, the backwards van Eck transform b is defined as follows: If a(n) has already appeared in a, let a(m) be the most recent occurrence, and set b(n)=nm; otherwise b(n)=0. (Comment from A171899).


LINKS



MATHEMATICA

Block[{a = Array[EulerPhi, 94], b = {}, m}, Do[If[! IntegerQ[m[#]], Set[m[#], i]; AppendTo[b, 0], AppendTo[b, i  m[#]]; Set[m[#], i]] &@ a[[i]], {i, Length[a]}]; b] (* Michael De Vlieger, Apr 06 2021 *)


PROG

(PARI)
up_to = 105;
backVanEck_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = ipp, outvec[i] = 0); mapput(om, invec[i], i)); outvec; };
v171934 = backVanEck_transform(vector(up_to, n, eulerphi(n)));


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



