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.

A062347 a(n) = (product of first n primes) modulo prime(n+1).

Original entry on oeis.org

1, 2, 1, 2, 1, 9, 8, 18, 15, 17, 19, 11, 6, 26, 35, 27, 15, 55, 30, 24, 28, 4, 47, 56, 28, 28, 75, 25, 105, 30, 9, 52, 111, 89, 46, 132, 53, 97, 104, 106, 42, 94, 158, 184, 155, 5, 6, 45, 87, 78, 86, 26, 120, 33, 242, 66, 86, 2, 214, 2, 198, 127, 14, 112, 7, 141, 77, 309
Offset: 0

Views

Author

Henry Bottomley, Jul 06 2001

Keywords

Examples

			a(4)=1 since 2*3*5*7 = 210 = 19*11 + 1.
		

Crossrefs

Programs

  • Mathematica
    Mod[ #[ [ 1 ] ], #[ [ 2 ] ] ]&/@ Transpose[ {FoldList[ Times, 1, Prime[ Range[ 70 ] ] ], Prime[ Range[ 71 ] ]} ]
    Join[{1},Module[{nn=70,prs},prs=Prime[Range[nn]];Table[Mod[Fold[Times,Take[prs,n-1]],prs[[n]]],{n,2,nn}]]] (* Harvey P. Dale, Jun 30 2024 *)
  • PARI
    { n=-1; f=1; forprime (p=2, prime(1001), write("b062347.txt", n++, " ", f%p); f*=p ) } \\ Harry J. Smith, Aug 05 2009
    
  • Python
    from sympy import sieve, primorial
    print([1] + [primorial(k) % sieve[k+1] for k in range(1, 71)])
    # Karl-Heinz Hofmann, Jan 26 2022

Formula

a(n) = A051126(A002110(n), A000040(n+1)).