login
A255217
Primorial mod sum-of-primes.
4
0, 1, 0, 6, 14, 18, 52, 0, 70, 90, 50, 98, 0, 148, 82, 150, 110, 453, 450, 213, 262, 637, 0, 69, 530, 129, 1106, 339, 1110, 1416, 1290, 1443, 994, 30, 2274, 933, 646, 0, 0, 168, 0, 3234, 0, 786, 2014, 3270, 1680, 0, 1222, 0, 1070, 690, 0, 2934, 416, 0, 0, 0, 708
OFFSET
1,4
COMMENTS
Does 0 appear infinitely often in this sequence? See A051838.
LINKS
FORMULA
a(n) = prime(n)# mod A007504(n).
EXAMPLE
For n = 4, a(4) = (2*3*5*7) mod (2+3+5+7) = 210 mod 17 = 6.
MATHEMATICA
Table[Mod[Product[Prime[i], {i, n}], Sum[Prime[i], {i, n}]], {n, 60}] (* Ivan N. Ianakiev, Apr 25 2015 *)
With[{pr=Prime[Range[60]]}, Mod[#[[1]], #[[2]]]&/@Thread[{FoldList[ Times, pr], Accumulate[pr]}]] (* Harvey P. Dale, Jan 22 2016 *)
PROG
(PARI) a(n) = my(vp=primes(n)); vecprod(vp) % vecsum(vp); \\ Michel Marcus, Dec 05 2021
(PARI) lista(nn) = {my(s=0, p=1); forprime(q=2, nn, s += q; p *= q; print1(p%s, ", "); ); } \\ Michel Marcus, Dec 05 2021
CROSSREFS
Cf. A002110 (Primorial numbers), A007504 (Sum of first n primes)
Sequence in context: A072204 A037177 A351975 * A048747 A175678 A173870
KEYWORD
nonn,easy
AUTHOR
Walter Carlini, Apr 25 2015
EXTENSIONS
More terms from Michel Marcus, Apr 25 2015
STATUS
approved