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.

A379760 Smallest prime that is the sum of 2n+1 cubes of consecutive odd primes.

Original entry on oeis.org

66347, 15643, 81647, 279397, 1961623, 3701627, 5644601, 2505187, 8016551, 4695947, 9335519, 6819443, 12830327, 35259463, 35278489, 56759723, 39944393, 86442623, 186387137, 95860493, 118647143, 170943137, 118651139, 509399153, 241399309, 381448853, 877324879
Offset: 1

Views

Author

Michel Lagneau, Jan 02 2025

Keywords

Examples

			For n=2, the smallest sum of 2*n+1 = 5 cubed consecutive primes which is prime is a(2) = 7^3 + 11^3 + 13^3 + 17^3 + 19^3 = 15643.
		

Crossrefs

Cf. A030078 (cube of primes), A082244 (analog for primes), A380319 (analog for square of primes).

Programs

  • Maple
    P3:= map(t -> t^3, select(isprime,[seq(i,i=3..10^5,2)])):
    SP3:= ListTools:-PartialSums(P3):
    f:= proc(n) local k;
      for k from 1 do if isprime(SP3[k+2*n+1]-SP3[k]) then return SP3[k+2*n+1]-SP3[k] fi od
    end proc:
    map(f, [$1..50]); # Robert Israel, Feb 02 2025
  • Mathematica
    a[n_] := Block[{k = 1, s}, While[s = Sum[Prime[i]^3, {i, k, k + 2n}]; !PrimeQ[s], k++ ]; s]; Table[a[n], {n, 1, 27}]
  • PARI
    a(n) = my(k=2, s = sum(i=0, 2*n, prime(k+i)^3)); while (!isprime(s), s -= prime(k)^3; k++; s += prime(k+2*n)^3;); s; \\ Michel Marcus, Jan 20 2025