login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primorial mod sum-of-primes.
4

%I #57 Dec 05 2021 10:38:38

%S 0,1,0,6,14,18,52,0,70,90,50,98,0,148,82,150,110,453,450,213,262,637,

%T 0,69,530,129,1106,339,1110,1416,1290,1443,994,30,2274,933,646,0,0,

%U 168,0,3234,0,786,2014,3270,1680,0,1222,0,1070,690,0,2934,416,0,0,0,708

%N Primorial mod sum-of-primes.

%C Does 0 appear infinitely often in this sequence? See A051838.

%H Harvey P. Dale, <a href="/A255217/b255217.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = prime(n)# mod A007504(n).

%e For n = 4, a(4) = (2*3*5*7) mod (2+3+5+7) = 210 mod 17 = 6.

%t Table[Mod[Product[Prime[i],{i,n}],Sum[Prime[i],{i,n}]],{n,60}] (* _Ivan N. Ianakiev_, Apr 25 2015 *)

%t With[{pr=Prime[Range[60]]},Mod[#[[1]],#[[2]]]&/@Thread[{FoldList[ Times, pr], Accumulate[pr]}]] (* _Harvey P. Dale_, Jan 22 2016 *)

%o (PARI) a(n) = my(vp=primes(n)); vecprod(vp) % vecsum(vp); \\ _Michel Marcus_, Dec 05 2021

%o (PARI) lista(nn) = {my(s=0, p=1); forprime(q=2, nn, s += q; p *= q; print1(p%s, ", "););} \\ _Michel Marcus_, Dec 05 2021

%Y Cf. A002110 (Primorial numbers), A007504 (Sum of first n primes)

%K nonn,easy

%O 1,4

%A _Walter Carlini_, Apr 25 2015

%E More terms from _Michel Marcus_, Apr 25 2015