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.

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