login
Ordinal transform of A032742, starting from its first term a(1) = 1.
2

%I #11 Dec 24 2021 08:10:47

%S 1,2,3,1,4,1,5,1,2,1,6,1,7,1,2,1,8,1,9,1,2,1,10,1,3,1,2,1,11,1,12,1,2,

%T 1,3,1,13,1,2,1,14,1,15,1,2,1,16,1,4,1,2,1,17,1,3,1,2,1,18,1,19,1,2,1,

%U 3,1,20,1,2,1,21,1,22,1,2,1,4,1,23,1,2,1,24,1,3,1,2,1,25,1,4,1,2,1,3,1,26,1,2,1,27,1,28,1,2,1,29,1,30,1,2,1,31

%N Ordinal transform of A032742, starting from its first term a(1) = 1.

%C If we instead apply the ordinal transform to A032742 starting from its second term a(2) = 1, the result seems to be a shifted version of A055396.

%H Antti Karttunen, <a href="/A286477/b286477.txt">Table of n, a(n) for n = 1..10000</a>

%t Function[{s, t}, ReplacePart[t, Flatten@ Map[MapIndexed[#1 -> First@ #2 &, #] &, Values@ s]]] @@ {PositionIndex@ #, ConstantArray[0, Length@ #]} & Table[n/FactorInteger[n][[1, 1]], {n, 113}] (* _Michael De Vlieger_, May 12 2017, Version 10 *)

%t b[_] = 0;

%t a[n_] := a[n] = With[{t = If[n == 1, 1, Divisors[n][[-2]]]}, b[t] = b[t]+1];

%t Array[a, 1000] (* _Jean-François Alcover_, Dec 24 2021 *)

%Y Cf. A032742, A055396.

%K nonn

%O 1,2

%A _Antti Karttunen_, May 12 2017