login
a(1)=3, a(2)=1, a(n) = (n+1)/2 if n is an odd prime, and a(n) = a(floor(n/2)) otherwise.
0

%I #8 Dec 18 2022 02:33:55

%S 3,1,2,1,3,2,4,1,1,3,6,2,7,4,4,1,9,1,10,3,3,6,12,2,2,7,7,4,15,4,16,1,

%T 1,9,9,1,19,10,10,3,21,3,22,6,6,12,24,2,2,2,2,7,27,7,7,4,4,15,30,4,31,

%U 16,16,1,1,1,34,9,9,9,36,1,37,19,19,10,10,10,40,3,3,21,42,3,3,22,22,6,45,6

%N a(1)=3, a(2)=1, a(n) = (n+1)/2 if n is an odd prime, and a(n) = a(floor(n/2)) otherwise.

%t a[1] = 3; a[2] = 1;

%t a[n_] := a[n] = If[PrimeQ[n], (n + 1)/2, a[Floor[n/2]]];

%t Table[a[n],{n,1,100}]

%K nonn,less

%O 1,1

%A _Roger L. Bagula_, Nov 03 2008