OFFSET
1,1
COMMENTS
From M. F. Hasler, Mar 10 2014: (Start)
The terms a(n) must have the same parity as the sum of the first n primes, A007504(n), which is the opposite of the parity of the index n. Otherwise said, the sequence is congruent to 0,1,0,1,0,1,... (mod 2).
The since the terms of this sequence are divisors of primorials A002110, they are squarefree numbers, A005117.
Is it true, and if so, can it be proved that
* all of the squarefree numbers do appear?
* all of the squarefree numbers do appear infinitely often?
At least it seems that this is the case for the terms 1, 2 and 3. (End)
A239070(n) = position of first occurrence of n-th squarefree number in this sequence. - Reinhard Zumkeller, Mar 10 2014
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 9592 terms from M. F. Hasler)
FORMULA
EXAMPLE
The first 7 primes are 2,3,5,7,11,13,17. 2+3+5+7+11+13+17 = 58 = 2*29. So a(7) = gcd(58, 2*3*5*7*11*13*17) = 2.
MAPLE
seq(gcd(add(ithprime(i), i=1..n), mul(ithprime(j), j=1..n)), n=1..50); # Emeric Deutsch, Nov 24 2007
# second Maple program:
with(numtheory):
s:= proc(n) s(n):= `if`(n=0, 0, s(n-1)+ithprime(n)) end:
a:= n-> mul(`if`(i<=ithprime(n), i, 1), i=factorset(s(n))):
seq(a(n), n=1..100); # Alois P. Heinz, Mar 10 2014
MATHEMATICA
nn=60; With[{prs=Prime[Range[nn]]}, Table[GCD[Total[Take[prs, n]], Times@@Take[ prs, n]], {n, nn}]] (* Harvey P. Dale, May 07 2011 *)
PROG
(PARI) c=s=0; forprime(p=2, 1e5, f=factor(s+=p, p); f[, 2]=apply(t->t<=p, f[, 1]); write("/tmp/b132995.txt", c++" "factorback(f))) \\ M. F. Hasler, Mar 09 2014
(Haskell)
a132995 n = a132995_list !! (n-1)
a132995_list = tail $ f a000040_list 0 1 where
f (p:ps) u v = (gcd u v) : f ps (p + u) (p * v)
-- Reinhard Zumkeller, Mar 09 2014
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Nov 22 2007
EXTENSIONS
More terms from Emeric Deutsch, Nov 24 2007
STATUS
approved