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

A006285 Odd numbers not of form p + 2^k (de Polignac numbers).

Original entry on oeis.org

1, 127, 149, 251, 331, 337, 373, 509, 599, 701, 757, 809, 877, 905, 907, 959, 977, 997, 1019, 1087, 1199, 1207, 1211, 1243, 1259, 1271, 1477, 1529, 1541, 1549, 1589, 1597, 1619, 1649, 1657, 1719, 1759, 1777, 1783, 1807, 1829, 1859, 1867, 1927, 1969, 1973, 1985, 2171, 2203, 2213, 2231, 2263, 2279, 2293, 2377, 2429, 2465, 2503, 2579, 2669
Offset: 1

Views

Author

Keywords

Comments

Contains both primes (A065381) and composites (A098237). - Jonathan Vos Post, Jun 19 2008
Crocker shows that this sequence is infinite; in particular, 2^2^n - 5 is in this sequence for each n > 2. - Charles R Greathouse IV, Sep 01 2015
Problem: what is the asymptotic density of de Polignac numbers? Based on the data in A254248, it seems this sequence may have an asymptotic density d > 0.05. Conjecture (cf. Pomerance 2013): the density d(n) of de Polignac numbers <= n is d(n) ~ (1 - 2/log(n))^(log(n)/log(2)), so the asymptotic density d = exp(-2/log(2)) = 0.055833... = 0.111666.../2. - Thomas Ordowski, Jan 30 2021
From Amiram Eldar, Feb 03 2021: (Start)
Romanov (or Romanoff) proved in 1934 that the complementary sequence has a positive lower asymptotic density, and the assumed asymptotic density was later named Romanov's constant (Pintz, 2006).
The lower asymptotic density of this sequence is positive (Van Der Corput, 1950; Erdős, 1950), and larger than 0.00905 (Habsieger and Roblot, 2006).
The upper asymptotic density of this sequence is smaller than 0.392352 (Elsholtz and Schlage-Puchta, 2018).
Previous bounds on the upper asymptotic density were given by Chen and Sun (2006), Pintz (2006), Habsieger and Roblot (2006), Lü (2007) and Habsieger and Sivak-Fischler (2010).
Romani (1983) conjectured that the asymptotic density of this sequence is 0.066... (End)
Chen, Dai, & Li show that the lower asymptotic density of this sequence is larger than 0.00965, improving on Habsieger & Roblot. - Charles R Greathouse IV, Jul 08 2024

Examples

			127 is in the sequence since 127 - 2^0 = 126, 127 - 2^1 = 125, 127 - 2^2 = 123, 127 - 2^3 = 119, 127 - 2^4 = 111, 127 - 2^5 = 95, and 127 - 2^6 = 63 are all composite. - _Michael B. Porter_, Aug 29 2016
		

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 226.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section F13.
  • Clifford A. Pickover, A Passion for Mathematics, John Wiley & Sons, Inc., NJ, 2005, pp. 62 & 300.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • J. G. Van Der Corput, On de Polignac's conjecture, Simon Stevin, Vol. 27 (1950), pp. 99-105.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, see #127.

Crossrefs

Programs

  • Haskell
    a006285 n = a006285_list !! (n-1)
    a006285_list = filter ((== 0) . a109925) [1, 3 ..]
    -- Reinhard Zumkeller, May 27 2015
    
  • Magma
    lst:=[]; for n in [1..1973 by 2] do x:=-1; repeat x+:=1; a:=n-2^x; until a lt 1 or IsPrime(a); if a lt 1 then Append(~lst, n); end if; end for; lst; // Arkadiusz Wesolowski, Aug 29 2016
    
  • Maple
    N:= 10000: # to get all terms <= N
    P:= select(isprime, {2,seq(i,i=3..N,2)}):
    T:= {seq(2^i,i=0..ilog2(N))}:
    R:= {seq(i,i=1..N,2)} minus {seq(seq(p+t,p=P),t=T)}:
    sort(convert(R,list)); # Robert Israel, Sep 23 2016
  • Mathematica
    Do[ i = 0; l = Ceiling[ N[ Log[ 2, n ] ] ]; While[ ! PrimeQ[ n - 2^i ] && i < l, i++ ]; If[ i == l, Print[ n ] ], {n, 1, 2000, 2} ]
    Join[{1},Select[Range[5,1999,2],!MemberQ[PrimeQ[#-2^Range[Floor[ Log[ 2,#]]]], True]&]] (* Harvey P. Dale, Jul 22 2011 *)
  • PARI
    isA006285(n,i=1)={ bittest(n,0) && until( isprime(n-i) || nn } \\ M. F. Hasler, Jun 19 2008, updated Apr 12 2017
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A006285_gen(startvalue=1): # generator of terms
        return filter(lambda n: not any(isprime(n-(1<A006285_list = list(islice(A006285_gen(),30)) # Chai Wah Wu, Nov 29 2023

Formula

A109925(a(n)) = 0. - Reinhard Zumkeller, May 27 2015
Conjecture: a(n) ~ n*exp(2/log(2)) = n*17.91... - Thomas Ordowski, Feb 02 2021

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 13 2000

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

A350628 Number of ways to write 2*n as 3^i (i >= 1) plus a prime.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 05 2022

Keywords

Crossrefs

A350630 Positive numbers k such that 2k cannot be written as 3^i (i >= 1) plus a prime.

Original entry on oeis.org

1, 2, 9, 12, 18, 21, 24, 27, 30, 33, 36, 39, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 126, 129, 132, 135, 138, 141, 144, 147, 150, 153, 156, 159, 162, 164, 165, 168, 171, 174, 177, 180, 183, 186, 189, 192
Offset: 1

Views

Author

N. J. A. Sloane, Feb 05 2022

Keywords

Comments

A350629 divided by 2.

Crossrefs

A350958 Positive numbers k such that 2k cannot be written as 3^i (i >= 0) plus a prime.

Original entry on oeis.org

1, 18, 33, 39, 48, 60, 63, 72, 78, 81, 93, 102, 105, 108, 111, 138, 144, 150, 153, 162, 164, 165, 168, 171, 183, 186, 189, 198, 204, 207, 213, 219, 228, 237, 243, 249, 258, 264, 267, 270, 273, 276, 281, 288, 291, 303, 306, 312, 315, 318, 333, 336, 345, 348, 354, 357
Offset: 1

Views

Author

N. J. A. Sloane, Feb 05 2022

Keywords

Comments

A058517 halved.

Crossrefs

A350629 Positive even numbers that cannot be written as 3^i (i >= 1) plus a prime.

Original entry on oeis.org

2, 4, 18, 24, 36, 42, 48, 54, 60, 66, 72, 78, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 328, 330, 336, 342, 348, 354, 360, 366
Offset: 1

Views

Author

N. J. A. Sloane, Feb 05 2022

Keywords

Comments

Indices of zeros in A350628 multiplied by 2.

Crossrefs

A350959 Number of ways to write 2*n+1 as 2^i (i >= 0) plus a prime.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 06 2022, answering a question from David W. Lewis

Keywords

Crossrefs

Formula

a(n) = A109925(2*n+1). - R. J. Mathar, Mar 07 2022
Showing 1-7 of 7 results.