|
|
A241663
|
|
Number of positive integers k less than or equal to n such that gcd(k,n) = gcd(k+1,n) = gcd(k+2,n) = gcd(k+3,n) = 1.
|
|
5
|
|
|
1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 7, 0, 9, 0, 0, 0, 13, 0, 15, 0, 0, 0, 19, 0, 5, 0, 0, 0, 25, 0, 27, 0, 0, 0, 3, 0, 33, 0, 0, 0, 37, 0, 39, 0, 0, 0, 43, 0, 21, 0, 0, 0, 49, 0, 7, 0, 0, 0, 55, 0, 57, 0, 0, 0, 9, 0, 63, 0, 0, 0, 67, 0, 69, 0, 0, 0, 21, 0, 75, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
COMMENTS
|
a(n) is the 4th Schemmel totient function.
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(p^e) = p^(e-1)*(p-4) for p > 3. a(2^e) = a(3^e) = 0 for e > 0.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/6) * Product_{p prime >= 5} (1 - 4/p^2) = 0.11357982182683545733... . - Amiram Eldar, Oct 13 2022
|
|
EXAMPLE
|
a(35) = a(5)*a(7) = 1*3 = 3.
|
|
MATHEMATICA
|
Table[Boole[n == 1] + Count[Partition[Range@ n, 4, 1], _?(AllTrue[#, CoprimeQ[n, #] &] &)], {n, 81}] (* or *)
Array[If[# == 1, 1, Apply[Times, FactorInteger[#] /. {p_, e_} /; p > 1 :> If[p > 3, (p - 4) p^(e - 1), 0]]] &, 81] (* Michael De Vlieger, Nov 05 2017 *)
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n)); prod(i=1, #f~, if ((f[i, 1] == 2) || (f[i, 1] == 3), 0, f[i, 1]^(f[i, 2]-1)*(f[i, 1]-4))); } \\ Michel Marcus, May 01 2014
(Scheme)
;; After the given multiplicative formula. Uses memoization-macro definec:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|