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

A332079 Number of primes between 2^n and the least prime p > 2^n in A332075, i.e., such that k + 2^m is prime, where k and m are the odd part and 2-valuation, respectively, of p-1.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 8, 1, 9, 7, 0, 0, 7, 5, 1, 2, 4, 9, 1, 7, 8, 6, 11, 0, 4, 0, 1, 1, 0, 0, 10, 17, 3, 0, 8, 0, 10, 20, 3, 23, 15, 3, 20, 13, 7, 36, 17, 15, 4, 4, 0, 9, 15, 10, 21, 8, 22, 36, 6, 13, 2, 7, 36, 14, 10, 9, 4, 0, 44, 10, 8, 27, 5, 1, 0, 2, 22, 3, 2, 33, 20, 21, 19, 12, 12, 5
Offset: 1

Views

Author

M. F. Hasler, Aug 13 2020

Keywords

Comments

It appears that the sequence of odd numbers k*2^m+1 such that k + 2^m is prime (A332075) mainly consists of primes, and many primes are in this sequence. This sequence attempts to measure in how far this remains true for large numbers.

Crossrefs

Cf. A332075, A000040 (primes), A000265 (odd part), A007814 (2-valuation).

Programs

  • Mathematica
    a[n_] := Module[{count = 0, p = NextPrime[2^n]}, While[!PrimeQ[(m = 2^IntegerExponent[p - 1, 2]) + (p - 1)/m], count++; p = NextPrime[p]]; count]; s = Array[a, 100] (* Amiram Eldar, Aug 14 2020 *)
  • PARI
    apply( {A332079(n,c=0)=forprime(p=2^n,,is_A332075(p)&&return(c);c++)}, [1..99])

A332078 Primes p = k*2^m + 1 such that k + 2^m is not prime, where k and m are the odd part and 2-valuation, respectively, of p-1.

Original entry on oeis.org

47, 67, 97, 107, 127, 137, 151, 167, 179, 181, 227, 239, 263, 283, 293, 307, 347, 349, 367, 431, 439, 457, 461, 467, 487, 491, 503, 547, 557, 571, 587, 599, 607, 617, 641, 643, 647, 661, 683, 719, 727, 733, 739, 751, 769, 787, 797, 811, 821, 823, 827, 853, 857, 887, 907
Offset: 1

Views

Author

M. F. Hasler, Aug 13 2020

Keywords

Comments

It appears that the sequence of odd numbers k*2^m+1 such that k + 2^m is prime (A332075) mainly consists of the primes. This sequence lists the "exceptions": the complement of A332075 within the primes. (The exceptions become more frequent as the numbers grow, the asymptotic density of this subset within the primes might well approach one. See also A332079.)
These are primes of the form p = (w-2^m)*2^m + 1, where w is an odd composite number and 1 < 2^m < w. There are infinitely many primes of this form, because all primes p > 7 such that p == 7 (mod 20) are in this sequence. - Thomas Ordowski, Aug 13 2020

Crossrefs

Cf. A000040 (primes), A000265 (odd part), A007814 (2-valuation), A332075.
The terms A141882 > 7 are an infinite subsequence. - Thomas Ordowski, Aug 13 2020

Programs

  • Maple
    filter:= proc(p) local k,m;
       if not isprime(p) then return false fi;
       m:= padic:-ordp(p-1,2);
       k:= (p-1)/2^m;
       not isprime(k+2^m);
    end proc:
    select(filter, [seq(i,i=3..1000,2)]); # Robert Israel, Sep 14 2020
  • Mathematica
    Select[Range[1000], PrimeQ[#] && !PrimeQ[(m = 2^IntegerExponent[# - 1, 2]) + (# - 1)/m] &] (* Amiram Eldar, Aug 14 2020 *)
  • PARI
    (A332078_upto(N)=[p|p<-primes([1,N]),!is_A332075(p)])(1000)

A332076 Indices n of odd numbers 2n+1 such that k + 2^m is prime, where k and m are the odd part and 2-valuation, respectively, of 2n.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 24, 26, 27, 29, 30, 35, 36, 38, 39, 41, 44, 45, 50, 51, 54, 56, 57, 59, 60, 65, 66, 69, 71, 74, 77, 78, 80, 81, 84, 86, 87, 92, 95, 96, 98, 99, 101, 104, 105, 107, 110, 111, 114, 116, 120, 125, 126, 128, 129, 132, 134
Offset: 1

Views

Author

M. F. Hasler, Aug 13 2020

Keywords

Comments

It appears that about 1/log_10(N) of the odd numbers below 2N have this property: for n < 10^k with k = (1, 2, 3, 4, 5, 6), there are (7, 51, 364, 2675, 20668, 167185) numbers as defined in NAME.
See the sequence A332075 of the corresponding odd numbers for more information.

Crossrefs

Cf. A000040 (primes), A000265 (odd part), A007814 (2-valuation), A332075 (the corresponding odd numbers).

Programs

  • Mathematica
    Select[Range[134], PrimeQ[(m = 2^IntegerExponent[2*#, 2]) + 2*#/m] &] (* Amiram Eldar, Aug 16 2020 *)
  • PARI
    select( {is_A332076(n)=ispseudoprime((n>>n=valuation(n,2))+2<
    				
Showing 1-3 of 3 results.