[go: up one dir, main page]

login
A129843
a(n) = number of positive integers that are <= n and are coprime to n!! (n!! = A006882(n)).
1
1, 1, 2, 2, 3, 2, 3, 3, 4, 2, 4, 3, 4, 3, 4, 3, 5, 4, 5, 5, 5, 4, 5, 5, 5, 4, 5, 4, 5, 5, 5, 6, 6, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 7, 6, 6, 6, 7, 6, 7, 6, 7, 6, 8, 6, 8, 6, 7, 6, 8, 6, 8, 6, 8, 7, 8, 7, 9, 7, 9, 7, 10, 7, 10, 7, 10, 7, 10, 7, 11
OFFSET
1,3
LINKS
FORMULA
From Robert Israel, Dec 08 2022: (Start)
If n is odd, a(n) = A070939(n).
If n > 2 is even, a(n) = 1 + A056171(n). (End)
MAPLE
f:= proc(n) local t;
if n::odd then ilog2(n)+1
else 1+numtheory:-pi(n) - numtheory:-pi(n/2)
fi
end proc:
f(2):= 1:
map(f, [$1..100]); # Robert Israel, Dec 08 2022
MATHEMATICA
a[n_]:=Module[{}, co=0; For[i=1, i<n+1, i++, If[GCD[n!!, i]==1, co++ ]]; co]; Table[a[n], {n, 1, 80}] (* Stefan Steinerberger, Jun 05 2007 *)
Table[Total[Boole[CoprimeQ[n!!, Range[n]]]], {n, 80}] (* Harvey P. Dale, Dec 12 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 03 2007
EXTENSIONS
More terms from Stefan Steinerberger, Jun 05 2007
STATUS
approved