login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = n / gcd(n, A005940(n)).
6

%I #12 Jul 28 2023 15:53:06

%S 1,1,1,1,1,1,7,1,9,1,11,1,13,7,5,1,17,9,19,1,3,11,23,1,25,13,9,7,29,5,

%T 31,1,33,17,35,9,37,19,13,1,41,3,43,11,9,23,47,1,49,25,17,13,53,9,11,

%U 7,57,29,59,5,61,31,7,1,65,33,67,17,69,35,71,9,73,37,5,19,7,13,79,1,81,41,83,3,17,43,29,11,89

%N a(n) = n / gcd(n, A005940(n)).

%C Numerator of n / A005940(n).

%H Antti Karttunen, <a href="/A364501/b364501.txt">Table of n, a(n) for n = 1..16384</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%t nn = 89; Array[Set[a[#], #] &, 2]; Do[If[EvenQ[n], Set[a[n], 2 a[n/2]], Set[a[n], Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &, FactorInteger[a[(n + 1)/2]]]]], {n, 3, nn}], n]; Array[#/GCD[a[#], #] &, nn] (* _Michael De Vlieger_, Jul 28 2023 *)

%o (PARI)

%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };

%o A364501(n) = (n / gcd(n, A005940(n)));

%o (PARI) A364501(n) = { my(orgn=n,p=2,rl=0,z=1); n--; while(n, if(!(n%2), p=nextprime(1+p), rl++; if(1==(n%4), z *= p^min(rl,valuation(orgn,p)); rl=0)); n>>=1); (orgn/z); };

%Y Cf. A005940, A364500, A364502 (denominators), A364544 (positions of 1's).

%Y Cf. also A364491.

%K nonn,frac

%O 1,7

%A _Antti Karttunen_, Jul 28 2023