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

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

A091624 Lesser of consecutive primes whose sum is a perfect power (A001597).

Original entry on oeis.org

3, 17, 47, 61, 71, 107, 283, 881, 1151, 1913, 2591, 3527, 4049, 4093, 6047, 7193, 7433, 10973, 15137, 20807, 21617, 24197, 26903, 28793, 34847, 37039, 46817, 53129, 56443, 69191, 74489, 83231, 84047, 98563, 103049, 103967, 109507, 110441, 112337
Offset: 1

Views

Author

Robert G. Wilson v, Jan 24 2004

Keywords

Crossrefs

Cf. A071087.
Cf. A061275.

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; PrimeExponents[n_] := Flatten[ Table[ #[[2]], {1}] & /@ FactorInteger[n]]; p = q = 2; l = {}; Do[q = NextPrim[p]; If[ Apply[ GCD, PrimeExponents[p + q]] > 1, AppendTo[l, p]]; p = q, {n, 2, 13000}]

A237881 a(n) = 2-adic valuation of prime(n)+prime(n+1).

Original entry on oeis.org

0, 3, 2, 1, 3, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 4, 3, 7, 1, 4, 3, 1, 2, 1, 1, 2, 1, 3, 1, 4, 1, 2, 2, 5, 2, 2, 6, 1, 2, 5, 3, 2, 7, 1, 2, 1, 1, 1, 3, 1, 3, 5, 2, 2, 3, 2, 2, 2, 1, 2, 6, 3, 1, 4, 1, 3, 2, 2, 3, 1, 3, 1, 2, 4, 1, 2, 1, 1, 1, 2, 3, 2, 5, 3, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 6, 4, 5, 2, 2, 2, 2, 2, 3, 4, 3, 2, 1, 2, 1, 3, 2, 1, 2, 5, 3, 1, 1, 4
Offset: 1

Views

Author

Antonio Roldán, Feb 14 2014

Keywords

Examples

			a(5)=3 because prime(5)=11, prime(6)=13, 11+13=24=2^3*3, 2-adic valuation(24)=3.
		

Crossrefs

Programs

  • Mathematica
    IntegerExponent[ListConvolve[{1,1},Prime[Range[200]]],2] (* Paolo Xausa, Nov 02 2023 *)
  • PARI
    {for(i=1,200,k=valuation(prime(i)+prime(i+1),2);print1(k,", "))}
    
  • Python
    from sympy import prime
    def A237881(n): return (~(m:=prime(n)+prime(n+1))&m-1).bit_length() # Chai Wah Wu, Jul 08 2022

Formula

a(n) = A007814(A001043(n)).
a(n) << log n; in particular, a(n) <= log_2 n + log_2 log n + O(1). - Charles R Greathouse IV, Feb 14 2014

A165744 Numbers k with property that 6^k is the sum of two consecutive primes.

Original entry on oeis.org

2, 3, 7, 36, 54, 143, 1102, 1678
Offset: 1

Views

Author

Zak Seidov, Sep 26 2009

Keywords

Examples

			k=2: 6^2 = 36     = 17 + 19         = prime(7) + prime(8);
k=3: 6^3 = 216    = 107 + 109       = prime(28) + prime(29);
k=7: 6^7 = 279936 = 139967 + 139969 = prime(13005) + prime(13006).
		

Crossrefs

Programs

  • Mathematica
    (* M6 *) Do[If[PreviousPrime[6^n/2]+NextPrime[6^n/2]==6^n,Print[n]],{n,1000}]
  • PARI
    is(k) = my(t=6^k); precprime(t/2)+nextprime(1+t/2)==t; \\ Jinyuan Wang, Feb 18 2021

Extensions

a(7) from Max Alekseyev, Dec 14 2011
a(8) from Amiram Eldar, Apr 06 2019
Showing 1-4 of 4 results.