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-2 of 2 results.

A339957 Primes in A240860 (up to sign).

Original entry on oeis.org

5, 29, 149, 461, 1637, 1877, 4373, 13037, 13757, 32309, 41381, 43853, 63533, 69821, 92333, 154157, 174917, 228869, 250949, 358637, 381917, 388757, 565661, 587693, 651293, 697973, 755861, 790613, 862061, 985613, 1127309, 1180637, 1303613, 1739981, 2147693, 2345261, 2586989, 2684837, 2876261
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 24 2020

Keywords

Examples

			a(3) = 149 is in the sequence because it is prime and A240860(8) = -149.
		

Crossrefs

Cf. A240860.

Programs

  • Maple
    R:= NULL: count:= 0:
    v:= 0: p:= 1:
    while count < 100 do
      p:= nextprime(p);
      v:= p^2 - v;
      if isprime(v) then R:= R, v; count:= count+1 fi
    od:
    R;

A242188 a(n) = Sum_{i=1..n} (-1)^(i+1) prime(i)^3.

Original entry on oeis.org

0, 8, -19, 106, -237, 1094, -1103, 3810, -3049, 9118, -15271, 14520, -36133, 32788, -46719, 57104, -91773, 113606, -113375, 187388, -170523, 218494, -274545, 297242, -407727, 504946
Offset: 0

Views

Author

Timothy Varghese, May 22 2014

Keywords

Comments

For n even this is the negative of the sum of (3^3 - 2^3) + (7^3 - 5^3) + .. (prime(n)^3 - prime(n-1)^3). But this is half of the terms in the sum of (3^3 - 2^3) + (5^3 - 3^3) + (7^3 - 5^3) + ... + (prime(n)^3 - prime(n-1)^3) which has a sum that telescopes to prime(n)^3 - 8. Thus a good estimate of a(n) (half the terms) is prime(n)^3/2 (half the square of the n-th prime) which works well. For odd n, add prime(n)^2 to the estimate for even n.

Crossrefs

Programs

  • Maple
    ListTools:-PartialSums([0,seq((-1)^(i+1)*ithprime(i)^3, i=1..40)]); # Robert Israel, Mar 09 2020
  • Mathematica
    Table[Sum[(-1)^(i+1) Prime[i]^3,{i,n}],{n,0,30}] (* Harvey P. Dale, May 16 2021 *)
  • PARI
    a(n) = sum(i=1, n, (-1)^(i+1)*prime(i)^3);
Showing 1-2 of 2 results.