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.

Showing 1-3 of 3 results.

A309036 a(n) = gcd(A007504(n), A014285(n)).

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Robert Israel, Jul 08 2019

Keywords

Comments

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

Examples

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

Crossrefs

Programs

  • 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
  • Maple
    S1:= 0: S2:= 0:
    for n from 1 to 100 do
      p:= ithprime(n);
      S1:= S1 + p;
      S2:= S2 + n*p;
      A[n]:= igcd(S1,S2);
    od:
    seq(A[i],i=1..100);
  • Mathematica
    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 *)
  • PARI
    a(n) = gcd(sum(k=1, n, prime(k)), sum(k=1, n, k*prime(k))); \\ Michel Marcus, Jul 09 2019
    

Formula

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

A307414 Numbers k such that A014285(k) and A007504(k) are coprime.

Original entry on oeis.org

2, 3, 6, 7, 10, 11, 12, 14, 15, 18, 19, 22, 23, 24, 27, 30, 31, 32, 34, 35, 38, 39, 40, 44, 46, 47, 48, 51, 52, 55, 56, 58, 59, 60, 63, 64, 66, 67, 70, 71, 72, 74, 75, 76, 78, 79, 82, 83, 86, 87, 88, 91, 92, 94, 95, 96, 98, 99, 100, 102, 104, 106, 108, 110, 112, 114, 115, 116, 118, 119, 120, 122
Offset: 1

Views

Author

Robert Israel, Apr 07 2019

Keywords

Comments

Numbers k such that A306834(k) = A014285(k).
No terms == 1 (mod 4).
Numbers k such that A309036(k)=1. - Robert Israel, Jul 09 2019

Examples

			a(3) = 6 is a term because A007504(6) = 41 and A014285(6) = 184 are coprime.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # for terms <= N
    Primes:= map(ithprime, [$1..N]):
    S1:= ListTools:-PartialSums(Primes):
    S2:= ListTools:-PartialSums(zip(`*`,Primes, [$1..N])):
    select(t -> igcd(S1[t],S2[t])=1, [$1..N]);
  • Mathematica
    okQ[n_] := With[{pp = Prime[Range[n]]}, CoprimeQ[Total[pp], Total[pp.Range[n]]]];
    Select[Range[200], okQ] (* Jean-François Alcover, Dec 05 2023 *)
  • PARI
    isok(k) = my(vp=primes(k)); gcd(sum(i=1, k, vp[i]), sum(i=1, k, i*vp[i])) == 1; \\ Michel Marcus, Apr 07 2019

A307716 Denominator of the barycenter of first n primes defined as a(n) = denominator(Sum_{i=1..n} (i*prime(i)) / Sum_{i=1..n} prime(i)).

Original entry on oeis.org

1, 5, 10, 1, 14, 41, 58, 11, 50, 129, 160, 197, 119, 281, 328, 127, 110, 501, 568, 213, 89, 791, 874, 963, 53, 27, 1264, 457, 370, 1593, 1720, 1851, 71, 2127, 2276, 809, 1292, 2747, 2914, 3087, 1633, 1149, 34, 3831, 1007, 4227, 4438, 4661
Offset: 1

Views

Author

Andres Cicuttin, Apr 25 2019

Keywords

Comments

It appears that lim_{n->infinity} (1/n)*(A014285(n)/A007504(n)) = k, where k is a constant around 2/3.
a(n) = A007504(n) if and only if n is in A307414. - Robert Israel, Jul 08 2019

Crossrefs

Cf. A306834 (numerators), A272206, A007504, A014285, A307414.

Programs

  • Maple
    S1:= 0:S2:= 0:
    for n from 1 to 100 do
      p:= ithprime(n);
      S1:= S1 + p;
      S2:= S2 + n*p;
      A[n]:= denom(S2/S1)
    od:
    seq(A[i],i=1..100); # Robert Israel, Jul 08 2019
  • Mathematica
    a[n_]:=Sum[i*Prime[i], {i, 1, n}]/Sum[Prime[i], {i, 1, n}];
    Table[a[n]//Denominator, {n, 1, 48}]
  • PARI
    a(n) = my(vp=primes(n)); denominator(sum(i=1, n, i*vp[i])/sum(i=1, n, vp[i])) \\ Michel Marcus, Apr 25 2019

Formula

a(n) = denominator(Sum_{i=1..n} (i*prime(i)) / Sum_{i=1..n} prime(i)).
a(n) = denominator(A014285(n)/A007504(n)).
Showing 1-3 of 3 results.