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.

A115231 Primes p which cannot be written in the form 2^i + q^j where i >= 0, j >= 1, q = odd prime.

Original entry on oeis.org

2, 3, 149, 331, 373, 509, 701, 757, 809, 877, 907, 997, 1019, 1087, 1259, 1549, 1597, 1619, 1657, 1759, 1777, 1783, 1867, 1973, 2293, 2377, 2503, 2579, 2683, 2789, 2843, 2879, 2909, 2999, 3119, 3163, 3181, 3187, 3299, 3343, 3433, 3539, 3643, 3697, 3739, 3779
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 17 2006

Keywords

Comments

Union with A115232 gives all primes (A000040).
All terms > 3 are in A095842. - M. F. Hasler, Nov 20 2014

Examples

			A000040(35) = 149 = 2^7+3*7 = 2^6+5*17 = 2^5+3*3*13 =
2^4+7*19 = 2^3+3*47 = 2^2+5*29 = 2^1+3*7*7 = 2^0+2*2*37, therefore 149 is a term (A115230(35)=0).
		

Crossrefs

Programs

  • Mathematica
    maxp = 3779; Complement[pp = Prime[Range[PrimePi[maxp]]], Union[Sort[Reap[Do[p = 2^i + q^j; If[p <= maxp && PrimeQ[p], Sow[p]], {i, 0, Log[2, maxp]//Ceiling}, {j, 1, Log[3, maxp]//Ceiling}, {q, Rest[pp]} ]][[2, 1]]]]] (* Jean-François Alcover, Aug 03 2018 *)
  • PARI
    upto(n) = {my(pr = primes(primepi(n)), found = List(), s); for(i = 0, logint(n, 2), s = 2^i; forprime(q = 3, n - 2^i, for(j = 1, logint(n - 2^i, q),
    listput(found, s + q^j)))); listsort(found, 1); setminus(Set(pr), Set(found))} \\ David A. Corneth, Aug 03 2018

Extensions

Recomputed (based on recomputation of A115230) by R. J. Mathar and Reinhard Zumkeller, Apr 29 2010.
Edited by N. J. A. Sloane, Apr 30 2010
2, 3 inserted by David A. Corneth, Aug 03 2018

A115233 Primes p which have a unique representation as p = 2^i + q^j where i >= 0, j >= 1, q = odd prime.

Original entry on oeis.org

5, 127, 163, 179, 191, 193, 223, 239, 251, 269, 311, 337, 389, 419, 431, 457, 491, 547, 557, 569, 599, 613, 653, 659, 673, 683, 719, 739, 787, 821, 839, 853, 883, 911, 929, 953, 967, 977, 1117, 1123, 1201, 1229, 1249, 1283, 1289, 1297, 1303, 1327, 1381, 1409, 1423, 1439, 1451, 1471, 1481, 1499
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 17 2006

Keywords

Examples

			5 = 2+3 belongs to the sequence, but 23 = 2^2+19^1 = 2^4+7^1 does not.
		

Crossrefs

Subsequence of A115232. Cf. A115230, A115231.

Programs

  • Mathematica
    maxp = 1500; Clear[cnt]; cnt[_] = 0;
    pp = Prime[Range[PrimePi[maxp]]];
    Do[p = 2^i + q^j; If[p <= maxp && PrimeQ[p], cnt[p] = cnt[p] + 1], {i, 0, Log[2, maxp] // Ceiling}, {j, 1, Log[3, maxp] // Ceiling}, {q, Rest[pp]}
    ];
    Select[pp, cnt[#] == 1&] (* Jean-François Alcover, Aug 04 2018 *)

Extensions

Recomputed (based on recomputation of A115230) by R. J. Mathar and Reinhard Zumkeller, Apr 29 2010.
Edited by N. J. A. Sloane, Apr 30 2010
Data corrected by Jean-François Alcover, Aug 04 2018
Showing 1-2 of 2 results.