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.

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

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

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 17 2006

Keywords

Comments

a(n)=A000040(n+2) for n <= 32, but A000040(35)=149 is a term of A115231;
A115233 is a subsequence; the union with A115231 gives all primes (A000040);
A006512 and A053703 are subsequences.

Crossrefs

Programs

  • Mathematica
    maxp = 281;
    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, Prime[Range[2, PrimePi[maxp]]]}]][[2, 1]]]] (* Jean-François Alcover, 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
Terms a(1)=2 and a(2)=3 removed from Data by Jean-François Alcover, Aug 03 2018

A248412 Smallest prime p such that p - 2^e is also prime power (A053810) in exactly n cases for nonnegative integers e.

Original entry on oeis.org

149, 2, 5, 11, 83, 829, 3331, 32941, 176417, 854929, 2233531, 12699571, 47924959, 763597201
Offset: 0

Views

Author

Robert G. Wilson v, Oct 06 2014

Keywords

Comments

first case when A115230 equals n.
0: 149, 331, 373, 509, 701, 757, 809, 877, 907, 997, 1019, ...;
1: 2, 3, 127, 163, 179, 191, 193, 223, 239, 251, 269, 311, ...;
2: 5, 7, 23, 37, 47, 53, 59, 67, 71, 79, 97, 101, 103, ...;
3: 11, 13, 17, 19, 29, 31, 41, 43, 61, 73, 89, 131, 137, ...;
4: 83, 113, 139, 181, 199, 293, 353, 571, 593, 601, 619, ...;
5: 829, 1217, 1487, 2131, 2341, 2551, 2971, 4051, 4261, ...;
6: 3331, 12109, 14551, 17393, 18233, 22279, 22307, 22741, ...;
7: 32941, 34369, 44029, 49433, 53633, 67189, 95717, 99833, ...;
8: 176417, 304771, 314723, 314779, 349667, 414707, 451937, ...;
9: 854929, 1297651, 1328927, 1784723, 2164433, 2488909, ...;
10: 2233531, 6026089, 7475389, 7623229, 9644911, 10019551, ...;
11: 12699571, 18464123, 52849879, 78127339, 79303579, 84397463, ...;
12: 47924959, 153309649, 204797059, 248685923, 273865219, ...;
13: 763597201, ...;
...

Crossrefs

Cf. A115230, A244917, zeroth row A095842, first row A095841.

Programs

  • Mathematica
    f[p_] := Length@ Table[q = p - 2^exp; If[ PrimeNu@ q == 1, {q}, Sequence @@ {}], {exp, 0, Floor@ Log2@ p}]; t = Table[0, {20}]; p = 2; While[p < 1000000000, a = f[p] +1; If[a < 101 && t[[a]] == 0, t[[a]] == p; Print[{a -1, p}]]; p = NextPrime@ p]; t

Formula

a(n) <= A244917(n) for n>0.
Showing 1-4 of 4 results.