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”).

A364501
a(n) = n / gcd(n, A005940(n)).
6
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, 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, 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
OFFSET
1,7
COMMENTS
Numerator of n / A005940(n).
MATHEMATICA
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 *)
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A364501(n) = (n / gcd(n, A005940(n)));
(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); };
CROSSREFS
Cf. A005940, A364500, A364502 (denominators), A364544 (positions of 1's).
Cf. also A364491.
Sequence in context: A370467 A164003 A280704 * A069609 A019855 A200288
KEYWORD
nonn,frac
AUTHOR
Antti Karttunen, Jul 28 2023
STATUS
approved