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

A340317
(Product of primes <= n) read modulo n.
0
0, 0, 0, 2, 0, 0, 0, 2, 3, 0, 0, 6, 0, 0, 0, 14, 0, 12, 0, 10, 0, 0, 0, 6, 20, 0, 24, 14, 0, 0, 0, 18, 0, 0, 0, 30, 0, 0, 0, 10, 0, 0, 0, 22, 15, 0, 0, 18, 28, 10, 0, 26, 0, 6, 0, 42, 0, 0, 0, 30, 0, 0, 21, 38, 0, 0, 0, 34, 0, 0, 0, 6, 0, 0, 45, 38, 0, 0, 0, 50, 33, 0, 0, 42, 0, 0, 0, 22, 0, 60, 0, 46, 0, 0, 0, 6, 0, 14, 33
OFFSET
1,4
COMMENTS
Empirically Sum_{i=1..n} (a(i)) < n*sqrt(n).
It looks like the n's, where a(n) is nonzero, are in A013929 and the n's, where a(n) = 0, are squarefree numbers (A005117).
FORMULA
For n >= 1, a(n) = A034386(n) mod n.
EXAMPLE
n = 1; a(1) = 1 mod 1 = 0;
n = 2; a(2) = 2 mod 2 = 0;
n = 3; a(3) = 2*3 mod 3 = 0;
n = 4; a(4) = 2*3 mod 4 = 2;
n = 5; a(5) = 2*3*5 mod 5 = 0;
n = 6; a(6) = 2*3*5 mod 6 = 0;
and so on.
PROG
(PARI) a(n) = lcm(primes([2, n])) % n; \\ Michel Marcus, Jan 07 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Jan 04 2021
STATUS
approved