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.

A071352 Numbers n such that the sum of two consecutive primes prime(n+1) + prime(n) is a prime power, say q^w. The w values are in A071087.

Original entry on oeis.org

1, 2, 18, 564, 1462626667154509638735
Offset: 1

Views

Author

Labos Elemer, May 21 2002

Keywords

Examples

			n=1: p(2)+p(1) = 3+2 = 5^1
n=2: p(3)+p(2) = 5+3 = 2^3
n=18: p(19)+p(18) = 61+67 = 2^7
n=564: p(565)+p(564) = 4099+4093 = 2^13
		

Crossrefs

Programs

  • Mathematica
    Do[s=Prime[n+1]+Prime[n]; If[Equal[Length[FactorInteger[s]], 1], Print[{n, Prime[n], s}]], {n, 1, 10000000}]
    p = q = 2; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[q = NextPrim[p]; If[ Length[ Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[p + q]]] == 1, Print[n]]; p = q, {n, 1, 10^7}] (* Robert G. Wilson v, Jan 24 2004 *)

Formula

For n>1, a(n) = A007053(A071087(n)-1). - Max Alekseyev, Jul 27 2009

Extensions

a(5) added by Max Alekseyev, Feb 10 2011