|
|
A132995
|
|
a(n) = gcd(Sum_{k=1..n} prime(k), Product{j=1..n} prime(j)).
|
|
2
|
|
|
2, 1, 10, 1, 14, 1, 2, 77, 10, 3, 10, 1, 238, 1, 82, 3, 110, 3, 2, 213, 2, 7, 874, 3, 530, 129, 158, 3, 370, 177, 430, 3, 994, 3, 2, 3, 646, 2747, 2914, 21, 3266, 3, 3638, 3, 2014, 3, 14, 4661, 1222, 5117, 1070, 69, 5830, 3, 2, 6601, 6870, 7141, 2, 1, 26, 5
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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)
|
|
LINKS
|
|
|
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))):
|
|
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|