OFFSET
1,4
COMMENTS
Does 0 appear infinitely often in this sequence? See A051838.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn,easy
AUTHOR
Walter Carlini, Apr 25 2015
EXTENSIONS
More terms from Michel Marcus, Apr 25 2015
STATUS
approved