OFFSET
1,7
EXAMPLE
a(7) = (2*3*5*7*11*13*17) mod triangular(7) = 510510 mod (7*8/2) = 14.
MAPLE
A226734 := proc(n)
mul(ithprime(i), i=1..n) mod ( n*(n+1)/2) ;
end proc: # R. J. Mathar, Jun 18 2013
PROG
(Python)
primes = []
n = 2
primorial = 6
def addPrime(k):
global n, primorial
for p in primes:
if k%p==0: return
if p*p > k: break
primes.append(k)
print(primorial % (n*(n+1)/2), end=', ')
primorial *= k
n += 1
print(0, end=', ') # 2 % 1
for p in range(5, 1000, 6):
addPrime(p)
addPrime(p+2)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jun 15 2013
STATUS
approved