login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309036 a(n) = gcd(A007504(n), A014285(n)). 4

%I #21 Sep 08 2022 08:46:21

%S 2,1,1,17,2,1,1,7,2,1,1,1,2,1,1,3,4,1,1,3,8,1,1,1,20,43,1,3,4,1,1,1,

%T 28,1,1,3,2,1,1,1,2,3,107,1,4,1,1,1,2,7,1,1,10,3,1,1,30,1,1,1,2,5,1,1,

%U 2,1,1,3,2,1,1,1,2,1,1,1,142,1,1,3,4,1,1,11,2,1,1,1,10

%N a(n) = gcd(A007504(n), A014285(n)).

%C a(n) is even if n == 1 (mod 4).

%H Robert Israel, <a href="/A309036/b309036.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A007504(n)/A307716(n) = A014285(n)/A306834(n).

%e a(4) = gcd(2+3+5+7, 1*2+2*3+3*5+4*7) = gcd(17,51) = 17.

%p S1:= 0: S2:= 0:

%p for n from 1 to 100 do

%p p:= ithprime(n);

%p S1:= S1 + p;

%p S2:= S2 + n*p;

%p A[n]:= igcd(S1,S2);

%p od:

%p seq(A[i],i=1..100);

%t GCD @@ # & /@ Rest@ Nest[Append[#1, {#1[[-1, 1]] + #3, #1[[-1, -1]] + #2 #3}] & @@ {#1, #2, Prime@ #2} & @@ {#, Length@ #} &, {{0, 0}}, 89] (* _Michael De Vlieger_, Jul 08 2019 *)

%o (PARI) a(n) = gcd(sum(k=1, n, prime(k)), sum(k=1, n, k*prime(k))); \\ _Michel Marcus_, Jul 09 2019

%o (Magma) p:=PrimesUpTo(1000);[Gcd(&+[p[j]:j in [1..m]],&+[j*p[j]:j in [1..m]]): m in [1..90]]; // _Marius A. Burtea_, Jul 09 2019

%Y Cf. A007504, A014285, A306834, A307414 (a(n)=1), A307716, A309055, A309056.

%K nonn

%O 1,1

%A _Robert Israel_, Jul 08 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)