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-10 of 38 results. Next

A098237 Composite de Polignac numbers (A006285).

Original entry on oeis.org

905, 959, 1199, 1207, 1211, 1243, 1271, 1477, 1529, 1541, 1589, 1649, 1719, 1807, 1829, 1859, 1927, 1969, 1985, 2171, 2231, 2263, 2279, 2429, 2465, 2669, 2983, 2993, 3029, 3149, 3215, 3239, 3341, 3353, 3431, 3505, 3665, 3817, 3845, 3985
Offset: 1

Views

Author

Ralf Stephan, Aug 31 2004

Keywords

Comments

Odd composites that are not the sum of a prime and a power of two.

Crossrefs

Programs

  • Haskell
    a098237 n = a098237_list !! (n-1)
    a098237_list = filter ((== 0) . a109925) a071904_list
    -- Reinhard Zumkeller, May 27 2015

A254248 Number of terms in A006285 (de Polignac numbers) less than 10^n.

Original entry on oeis.org

0, 1, 1, 18, 262, 3393, 39541, 421863, 4457974, 46853770, 482301801, 4931928485
Offset: 0

Views

Author

Arkadiusz Wesolowski, Mar 16 2015

Keywords

Comments

a(n) < 10^n*exp(-(n*log(10))^c) for some c.

Crossrefs

Programs

  • Mathematica
    dePolignacQ[n_] := OddQ[n] && Module[{m = 2}, While[n > m + 1 && ! PrimeQ[n - m], m *= 2]; n <= m + 1]; seq[max_] := Module[{p = 10, c = 1, s = {0}}, Do[If[dePolignacQ[k], c++]; If[k == p, p *= 10; AppendTo[s, c]], {k, 5, 10^max}]; s]; seq[6] (* Amiram Eldar, Feb 04 2021 *)

Extensions

a(9) from Arkadiusz Wesolowski, Feb 09 2016
a(10)-a(11) from Amiram Eldar, Feb 04 2021

A330284 Numbers k such that both k and k+2 are de Polignac numbers (A006285).

Original entry on oeis.org

905, 3341, 3431, 4151, 4811, 4841, 5729, 7387, 7811, 8921, 10235, 10511, 11081, 11435, 12371, 12731, 13091, 14021, 14141, 14381, 14531, 15041, 15119, 16025, 16865, 17369, 18209, 18611, 18895, 18897, 20141, 20321, 20381, 20651, 21671, 24131, 24431, 24461, 24731
Offset: 1

Views

Author

Amiram Eldar, Dec 13 2019

Keywords

Comments

The first 3 pairs are given in the book by Wells.

Examples

			905 is in the sequence since both 905 and 905 + 2 = 907 are de Polignac numbers.
		

References

  • Alfred S. Posamentier and Ingmar Lehmann, Mathematical Curiosities: A Treasure Trove of Unexpected Entertainments, Prometheus Books, 2014, Chapter 1.
  • David Wells, Prime Numbers: The Most Mysterious Figures in Math, John Wiley & Sons Inc., Hoboken, New Jersey, 2005, page 176.

Crossrefs

Cf. A006285.

Programs

  • Mathematica
    dePolQ[n_] := AllTrue[n - 2^Range[Floor[Log[2, n]]], !PrimeQ[#] &]; seq = {}; q1 = False; Do[q2 = dePolQ[n]; If[q1 && q2, AppendTo[seq, n - 2]]; q1 = q2, {n, 3, 25000, 2}]; seq

A369375 Numbers m such that the Mersenne number 2^m - 1 is a de Polignac number (A006285).

Original entry on oeis.org

1, 7, 15, 23, 27, 31, 37, 39, 43, 55, 58, 63, 71, 79, 82, 91, 95, 111, 123, 127, 133, 135, 139, 143, 148, 151, 159, 167, 169, 172, 173, 175, 179, 183, 191, 195, 199, 207, 211, 223, 239, 255, 286, 295, 313, 316, 319, 335, 337, 351, 367, 373, 383, 406, 415, 417, 433, 435, 447, 455, 461, 463, 479
Offset: 1

Views

Author

Thomas Ordowski, Jan 22 2024

Keywords

Comments

Integers m > 0 such that 2^m-1 - 2^n is not prime for every natural n < m.
For m > 2, a number m is a term of this sequence if and only if A208083(m) = 0.
All Mersenne number m = 2^k-1 for k > 2 are in this sequence. The proof is below.
Cf. A138290 (see Chai Wah Wu's conjecture in the third comment). By Crocker's (1971) theorem: if m > 2 and a <> b, then 2^(2^m)-1 - 2^a - 2^b is not prime.
If a = 2^m-1, then b < a, so for m > 2, 2^(2^m-1)-1 is a de Polignac number, QED.
Note that 2^(2^m-1)-1 - 2^n is divisible by some prime factor of 2^(2^m)-1.
Prime numbers of this sequence are Mersenne primes > 3, and many other primes.
Conjecture: if n > 5, then |2^(2^n-1)-1 - 2^m| is not prime for every m > 0.
If so, then by the dual Riesel conjecture, 2^(2^n-1)-1 is a (dual) Riesel number, i.e., if n > 5, then (2^(2^n-1)-1)2^m-1 is composite for every integer m > 0.
For example, the double Mersenne prime 2^(2^7-1)-1 may be a dual Riesel number.
It seems that the natural density of these numbers is about twice as high as the density of de Polignac numbers.
For many terms m, 2m+1 is also in this sequence. By iteration (x -> 2x+1), the subsequence b(n) = (m+1)2^n-1, for n >= 0, is infinite if m = 7 (which has already been proven) and probably if m = 27 (which is hard to prove).

Examples

			7 is a term since {2^7-1-2, 2^7-1-2^2, 2^7-1-2^3, 2^7-1-2^4, 2^7-1-2^5, 2^7-1-2^6} = {125, 123, 119, 111, 95, 63} and all six of these numbers are composite.
Note that both 2^148-1 and 2^148+1 are de Polignac numbers.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{k = n -1}, While[k > 1 && !PrimeQ[2^n -1 -2^k], k--]; k == 1]; Select[ Range[3, 450], fQ] (* Robert G. Wilson v, Jan 22 2024 *)

Formula

For n > 1, a(n) = A138290(n-1) + 1.
A208083(a(n)) = 0, for n > 0.

Extensions

More terms from Robert G. Wilson v, Jan 22 2024

A350960 a(n) = (A006285(n)-1)/2.

Original entry on oeis.org

0, 63, 74, 125, 165, 168, 186, 254, 299, 350, 378, 404, 438, 452, 453, 479, 488, 498, 509, 543, 599, 603, 605, 621, 629, 635, 738, 764, 770, 774, 794, 798, 809, 824, 828, 859, 879, 888, 891, 903, 914, 929, 933, 963, 984, 986, 992, 1085, 1101, 1106, 1115, 1131, 1139, 1146, 1188
Offset: 0

Views

Author

N. J. A. Sloane, Feb 06 2022

Keywords

Crossrefs

A330303 Least start of a run of exactly n consecutive odd numbers that are all de Polignac numbers (A006285).

Original entry on oeis.org

1, 905, 18895, 56287, 3296885, 53892169, 496722329, 1415354159, 110690012639
Offset: 1

Views

Author

Amiram Eldar, Dec 13 2019

Keywords

Examples

			a(2) = 905 since both 905 and 905 + 2 = 907 are de Polignac numbers.
a(3) = 18895 since 18895, 18895 + 2 = 18897 and 18895 + 4 = 18899 are all de Polignac numbers.
		

Crossrefs

Programs

  • Mathematica
    dePolQ[n_] := AllTrue[n - 2^Range[0, Floor[Log[2, n]]], !PrimeQ[#] &]; max = 5; seq = Table[0, {max}]; count = 0; k = 3; While[count < max, If[dePolQ[k], kk = k + 2; While[dePolQ[kk], kk += 2]; n = (kk - k)/2; If[n <= max && seq[[n]] == 0, count++; seq[[n]] = k]; k = kk + 2, k += 2]]; seq

A156695 Odd numbers that are not of the form p + 2^a + 2^b, a, b > 0, p prime.

Original entry on oeis.org

1, 3, 5, 6495105, 848629545, 1117175145, 2544265305, 3147056235, 3366991695, 3472109835, 3621922845, 3861518805, 4447794915, 4848148485, 5415281745, 5693877405, 6804302445, 7525056375, 7602256605, 9055691835, 9217432215
Offset: 1

Views

Author

Keywords

Comments

Crocker shows that this sequence is infinite.
All members above 5 found so far (up to 2.5 * 10^11) are divisible by 255 = 3 * 5 * 17, and many are divisible by 257. I conjecture that all members of this sequence greater than 5 are divisible by 255. This implies that all odd numbers (greater than 7) are the sum of a prime and at most three positive powers of two.
Pan shows that, for every c > 1, a(n) << x^c. More specifically, there are constants C,D > 0 such that there are at least Dx/exp(C log x log log log log x/log log log x) members of this sequence up to x. - Charles R Greathouse IV, Apr 11 2016
All terms > 5 are numbers k > 3 such that k - 2^n is a de Polignac number (A006285) for every n > 0 with 2^n < k. Are there numbers K such that |K - 2^n| is a Riesel number (A101036) for every n > 0? If so, ||K - 2^n| - 2^m| is composite for every pair m,n > 0, by the dual Riesel conjecture. - Thomas Ordowski, Jan 06 2024
In keeping with the example's connection to A000215, the lowest ki for ki * Product_{i=0..11} (F(i)) to belong to A156695 are 1, 433007, 25471, 17047, 1291, 7, 101, 807, 83, 347, 9, 179. So for example, 433007*(3*5) is a term. This implies a variant of the first commented conjecture accordingly. - Bill McEachen, Apr 17 2025

Examples

			Prime factorization of terms:
F_0 = 3, F_1 = 5, F_2 = 17, F_3 = 257 are Fermat numbers (cf. A000215)
6495105    = 3   * 5   * 17               * 25471
848629545  = 3   * 5   * 17               * 461      * 7219
1117175145 = 3   * 5   * 17         * 257 * 17047
2544265305 = 3^2 * 5   * 17         * 257 * 12941
3147056235 = 3^2 * 5   * 17         * 257 * 16007
3366991695 = 3   * 5   * 17   * 83  * 257 * 619
3472109835 = 3   * 5   * 17         * 257 * 52981
3621922845 = 3   * 5   * 17^2       * 257 * 3251
3861518805 = 3^3 * 5   * 17         * 257 * 6547
4447794915 = 3^3 * 5   * 17         * 257 * 7541
4848148485 = 3^4 * 5   * 17               * 704161
5415281745 = 3   * 5   * 17               * 21236399
5693877405 = 3^2 * 5   * 17         * 257 * 28961
6804302445 = 3^2 * 5   * 17   * 53  * 257 * 653
7525056375 = 3^2 * 5^3 * 17         * 257 * 1531
7602256605 = 3   * 5   * 17         * 257 * 311      * 373
9055691835 = 3   * 5   * 17         * 257 * 138181
9217432215 = 3^2 * 5   * 17   * 173 * 257 * 271
		

Crossrefs

Programs

  • PARI
    is(n)=if(n%2==0,return(0)); for(a=1,log(n)\log(2), for(b=1,a, if(isprime(n-2^a-2^b),return(0)))); 1 \\ Charles R Greathouse IV, Nov 27 2013
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A156695_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue+(startvalue&1^1),1),2):
            l = n.bit_length()-1
            for a in range(l,0,-1):
                c = n-(1<A156695_list = list(islice(A156695_gen(),4)) # Chai Wah Wu, Nov 29 2023

Extensions

Factorizations added by Daniel Forgues, Jan 20 2011

A065381 Primes not of the form p + 2^k, p prime and k >= 0.

Original entry on oeis.org

2, 127, 149, 251, 331, 337, 373, 509, 599, 701, 757, 809, 877, 907, 977, 997, 1019, 1087, 1259, 1549, 1597, 1619, 1657, 1759, 1777, 1783, 1867, 1973, 2203, 2213, 2293, 2377, 2503, 2579, 2683, 2789, 2843, 2879, 2909, 2999, 3119, 3163, 3181, 3187, 3299
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 03 2001

Keywords

Comments

Sequence is infinite. For example, Pollack shows that numbers which are 1260327937 mod 2863311360 are not of the form p + 2^k for any prime p and k >= 0, and there are infinitely many primes in this congruence class by Dirichlet's theorem. - Charles R Greathouse IV, Jul 20 2014

Examples

			127 is a prime, 127-2^0 through 127-2^6 are all nonprimes.
		

Crossrefs

Programs

  • Haskell
    a065381 n = a065381_list !! (n-1)
    a065381_list = filter f a000040_list where
       f p = all ((== 0) . a010051 . (p -)) $ takeWhile (<= p) a000079_list
    -- Reinhard Zumkeller, Nov 24 2011
    
  • Mathematica
    fQ[n_] := Block[{k = Floor[Log[2, n]], p = n}, While[k > -1 && ! PrimeQ[p - 2^k], k--]; If[k > 0, True, False]]; Drop[Select[Prime[Range[536]], ! fQ[#] &], {2}] (* Robert G. Wilson v, Feb 10 2005; corrected by Arkadiusz Wesolowski, May 05 2012 *)
  • PARI
    is(p)=my(k=1);while(kp,return(isprime(p)));0 \\ Charles R Greathouse IV, Jul 20 2014

Formula

A078687(A049084(a(n))) = 0; subsequence of A118958. - Reinhard Zumkeller, May 07 2006

Extensions

Link and cross-reference fixed by Charles R Greathouse IV, Nov 09 2008

A109925 Number of primes of the form n - 2^k.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Jul 17 2005

Keywords

Comments

Erdős conjectures that the numbers in A039669 are the only n for which n-2^r is prime for all 2^rT. D. Noe and Robert G. Wilson v, Jul 19 2005
a(A006285(n)) = 0. - Reinhard Zumkeller, May 27 2015

Examples

			a(21) = 4, 21-2 =19, 21-4 = 17, 21-8 = 13, 21-16 = 5, four primes.
127 is the smallest odd number > 1 such that a(n) = 0: A006285(2) = 127. - _Reinhard Zumkeller_, May 27 2015
		

Crossrefs

Programs

  • Haskell
    a109925 n = sum $ map (a010051' . (n -)) $ takeWhile (< n)  a000079_list
    -- Reinhard Zumkeller, May 27 2015
    
  • Magma
    a109925:=function(n); count:=0; e:=1; while e le n do if IsPrime(n-e) then count+:=1; end if; e*:=2; end while; return count; end function; [ a109925(n): n in [1..105] ]; // Klaus Brockhaus, Oct 30 2010
    
  • Maple
    A109925 := proc(n)
        a := 0 ;
        for k from 0 do
            if n-2^k < 2 then
                return a ;
            elif isprime(n-2^k) then
                a := a+1 ;
            end if;
        end do:
    end proc:
    seq(A109925(n),n=1..80) ; # R. J. Mathar, Mar 07 2022
  • Mathematica
    Table[cnt=0; r=1; While[rRobert G. Wilson v, Jul 21 2005 *)
    Table[Count[n - 2^Range[0, Floor[Log2[n]]], ?PrimeQ], {n, 110}] (* _Harvey P. Dale, Oct 21 2024 *)
  • PARI
    a(n)=sum(k=0,log(n)\log(2),isprime(n-2^k)) \\ Charles R Greathouse IV, Feb 19 2013
    
  • Python
    from sympy import isprime
    def A109925(n): return sum(1 for i in range(n.bit_length()) if isprime(n-(1<Chai Wah Wu, Nov 29 2023

Formula

a(A118954(n))=0, a(A118955(n))>0; A118952(n)<=a(n); A078687(n)=a(A000040(n)). - Reinhard Zumkeller, May 07 2006
G.f.: ( Sum_{i>=0} x^(2^i) ) * ( Sum_{j>=1} x^prime(j) ). - Ilya Gutkovskiy, Feb 10 2022

Extensions

Corrected and extended by T. D. Noe and Robert G. Wilson v, Jul 19 2005

A058517 Positive even numbers not of the form prime + 3^x.

Original entry on oeis.org

2, 36, 66, 78, 96, 120, 126, 144, 156, 162, 186, 204, 210, 216, 222, 276, 288, 300, 306, 324, 328, 330, 336, 342, 366, 372, 378, 396, 408, 414, 426, 438, 456, 474, 486, 498, 516, 528, 534, 540, 546, 552, 562, 576, 582, 606, 612, 624, 630, 636, 666, 672, 690
Offset: 1

Views

Author

Robert G. Wilson v, Dec 21 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ i = 0; l = Ceiling[ N[ Log[ 3, n ] ] ]; While[ ! PrimeQ[ n - 3^i ] && i < l, i++ ]; If[ i == l, Print[ n ] ], {n, 2, 1000, 2} ]
  • PARI
    isok(n) = {if (n % 2, 0, lim = log(n)/log(3); for (k=0, lim, if (isprime(n - 3^k), return (0)););1;);} \\ Michel Marcus, Feb 25 2017
Showing 1-10 of 38 results. Next