cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A255217 Primorial mod sum-of-primes.

Original entry on oeis.org

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

Views

Author

Walter Carlini, Apr 25 2015

Keywords

Comments

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

Examples

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

Crossrefs

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

Programs

  • 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 *)
  • 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

Formula

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

Extensions

More terms from Michel Marcus, Apr 25 2015