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.

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

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

A144313 Prime numbers p such that p - 1 is the fourth a-figurate number, seventh b-figurate number and possibly tenth c-figurate number for some a, b and c and not a d-figurate number for any nontrivial d.

Original entry on oeis.org

29, 71, 113, 239, 281, 449, 491, 659, 701, 827, 911, 953, 1373, 1499, 1583, 1667, 1709, 1877, 2003, 2087, 2129, 2213, 2339, 2423, 2549, 2591, 2633, 2801, 2843, 2969, 3221, 3347, 3389, 3557, 3767, 3851, 4229, 4271, 4397, 4481, 4649, 4691, 4733, 5153, 5279
Offset: 1

Views

Author

Reikku Kulon, Sep 17 2008

Keywords

Comments

Appears to be necessarily a subset of A007528.
The 46th Mersenne prime exponent (Mpe, A000043) 43112609 is a member: 43112608 is the fourth 7185436-figurate number and the seventh 2052983-figurate number and is not a k-figurate number for any other k except 43112608 (trivially). Several other Mersenne prime exponents are members of this sequence.
It is conjectured:
- that this sequence is infinite;
- that there is a unique set {4, 7, 10, 16, ...} (A138694?) giving the possible orders in k-figurate numbers for the set S of all Mpe for which Mpe - 1 is a (4, 7) or (4, 10) k-figurate number;
- that the ratio of Mpe in this sequence to those not approaches a nonzero value;
- that a characteristic function f(n) exists which equals 1 iff n is in S.
Contribution from Reikku Kulon, Sep 18 2008: (Start)
Subset of the integers n such that n is congruent to 29 modulo 42. The case where p - 1 is a tenth c-figurate number occurs when p is also congruent to 281 modulo 630.
The first three primes where c is defined are 281, 911 and 2801, with c = 8, 22, 64; c is congruent to 8 modulo 14. All such primes are necessarily congruent to 1 modulo 10.
The first invalid values of c are 36 and 50, which correspond to the semiprimes 1541 = 23 * 67 and 2171 = 13 * 167. Both of these are members of A071331 and A098237. The next invalid value of c, 78, corresponds to 3431 = 47 * 73, once again a member of both sequences.
The first primes where a, b, c and d are all defined (which therefore excludes them from this sequence) are the consecutive 6581, 7211 and 7841, all members of A140856, A140732, A142076, A142317 and A142905. (End)

Crossrefs

Contribution from Reikku Kulon, Sep 18 2008: (Start)
Cf. A071331, A098237 (semiprimes)
Cf. A140856, A140732, A142076, A142317, A142905 (a, b, c and d all defined) (End)

A276458 Smallest odd number not of the form p + 2^k with p prime and k >= 0 that is divisible by the n-th prime.

Original entry on oeis.org

1719, 905, 959, 1199, 1807, 1207, 2983, 1541, 2465, 1271, 5143, 1271, 2279, 1927, 2279, 1829, 5917, 1541, 1207, 2263, 3239, 7387, 4717, 1649, 6161, 4841, 7169, 1199, 1243, 127, 10873, 959, 1529, 149, 11023, 2669, 12877, 2171, 1211, 1969, 905, 1719, 7913, 7289
Offset: 2

Views

Author

Arkadiusz Wesolowski, Sep 03 2016

Keywords

Comments

a(n) <= A213529(n).

Examples

			a(3) = 905 because it is the smallest de Polignac number (A006285) divisible by the third prime.
		

Crossrefs

Programs

  • Magma
    lst:=[]; for r in [2..45] do p:=NthPrime(r); n:=-p; f:=0; while IsZero(f) do n:=n+2*p; k:=-1; repeat k+:=1; a:=n-2^k; until a lt 1 or IsPrime(a); if a lt 1 then Append(~lst, n); f:=1; end if; end while; end for; lst;
  • Maple
    N:= 10^5: # to use de Polignac numbers <= N
    P:= select(isprime,{2,seq(i,i=3..N,2)}):
    dP:= {seq(i,i=1..N,2)}:
    for k from 0 to ilog2(N) do
      dP:= dP minus map(`+`,P,2^k)
    od:
    for m from 2 do
       R:= ListTools:-SelectFirst(1, t -> t mod P[m] = 0, dP);
       if R = {} then break fi;
       A[m]:= R[1];
    od:
    seq(A[i],i=2..m-1); # Robert Israel, Sep 06 2016
Showing 1-4 of 4 results.