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.

Previous Showing 11-15 of 15 results.

A181692 The smallest positive m such that 2^m-2^n-1 is prime, or 0 if such an m does not exist.

Original entry on oeis.org

2, 3, 3, 4, 6, 6, 8, 8, 14, 12, 14, 13, 20, 14, 18, 24, 22, 18, 20, 20, 38, 24, 42, 28, 32, 32, 50, 59, 34, 32, 44, 32, 38, 38, 36, 40, 48, 42, 40, 45, 48, 45, 56, 45, 54, 48, 76, 52, 68, 66, 100, 89, 80, 74, 80, 57, 66, 78, 98, 83, 162, 62, 166, 77, 66, 77, 72, 76, 74, 153, 80, 89, 86, 77, 94, 83, 78, 88, 110, 115, 84
Offset: 0

Views

Author

Vladimir Shevelev, Nov 05 2010

Keywords

Crossrefs

Cf. A096502.

Programs

  • Maple
    A181692 := proc(n) for m from n to 100000 do if isprime(2^m-2^n-1) then return m; end if; end do: return 0 ; end proc:
  • Mathematica
    m[n_]:=Module[{m=n+1},While[!PrimeQ[2^m-2^n-1],m++];m]
    Table[m[i],{i,0,80}] (* Harvey P. Dale, Dec 18 2010 *)
  • PARI
    for(n=0,80, for(m=n+1,oo, k=2^m-2^n-1; if(isprime(k),print1(m,", "); break))) \\ Hugo Pfoertner, Jan 12 2020

Extensions

a(12) corrected and sequence extended by R. J. Mathar, Nov 17 2010

A294386 a(n) is the smallest number whose deficiency or abundance is equal to 2*n, or a(n) = 0 if such a number does not exist.

Original entry on oeis.org

6, 3, 5, 7, 22, 11, 13, 27, 17, 19, 46, 23, 112, 58, 29, 31, 250, 57, 37, 55, 41, 43, 94, 47, 60, 106, 53, 87, 84, 59, 61, 85, 108, 67, 142, 71, 73, 712, 158, 79, 156, 83, 405, 115, 89, 141, 406, 119, 97, 202, 101, 103, 214, 107, 109, 145, 113, 177, 418, 143, 120, 243, 192, 127, 262, 131, 261, 274, 137, 139, 574, 185
Offset: 0

Views

Author

Michel Marcus and Omar E. Pol, Oct 29 2017

Keywords

Comments

If A096502(n) <> 0, i.e., there is a prime p of the form 2^k - 2*n - 1, then 0 < a(n) <= 2^(k-1)*p since 2^(k-1)*p has deficiency 2*n. - Robert Israel, Oct 29 2017

Crossrefs

Bisection of A294347.
First differs from A217769 at a(12).

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    count:= 0:
    for n from 1 while count < N+1 do
      d:= abs(2*n - numtheory:-sigma(n));
      if d::even and d <= 2*N and not assigned(A[d/2]) then
        count:= count+1; A[d/2]:= n;
      fi
    od:
    seq(A[i],i=0..N); # Robert Israel, Oct 29 2017
  • PARI
    a033879(n) = 2*n-sigma(n)
    a(n) = my(k=1); while(1, if(abs(a033879(k))==2*n, return(k)); k++) \\ Felix Fröhlich, Oct 29 2017

A252168 Smallest k > 0 such that |(2n-1) - 2^k| is prime, or -1 if no such k exists.

Original entry on oeis.org

2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 4, 1, 1, 2, 3, 1, 2, 1, 1, 2, 1, 2, 4, 1, 2, 4, 1, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 4, 1, 2, 4, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 4, 3, 4, 4, 47, 1, 2, 1, 2, 6, 1, 1, 2, 3, 3, 8, 1, 1, 2, 3, 1, 2, 5, 1, 2, 1, 2, 4
Offset: 1

Views

Author

Eric Chen, Dec 14 2014

Keywords

Comments

It is known that a(254602) = -1, because |509203-2^k| is always divisible by 3, 5, 7, 13, 17, or 241. a(1147) is the first unknown term.
a((A101036(n)+1)/2) = -1, so there are infinitely many n such that a(n) = -1.
a((A133122(n)+1)/2) = A096502((A133122(n)-1)/2).

Examples

			a(12) = 2 because 2*12-1 = 23 and that 23-2^1 = 21 is not prime but 23-2^2 = 19 is.
a(69) = 6 because 2*69-1 = 137, |137-2^k| is composite for k = 1, 2, 3, 4, 5 and prime for k = 6.
Even the smallest k can be also very large. For example, a(169) = 791.
a(1147) > 65536.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[!PrimeQ[Abs[(2*n-1) - 2^k]], k++]; k, {n, 1, 1000}]
  • PARI
    A252168(n)={ my(k=1); n=2*n-1; while(!ispseudoprime(abs(n-2^k)), k++); k }

Extensions

a(19) corrected by Jinyuan Wang, Mar 25 2023

A096823 a(n) = p*(p+(2n-1))/2, where p = A096822(n) is the smallest primes of form 2^x-(2n-1).

Original entry on oeis.org

6, 20, 12, 151115727449904501489664, 56, 40, 24, 272, 1504, 208, 176, 1312, 112, 80, 48, 6208, 992, 928, 2059264, 5696, 736, 144115176533131264, 608, 544, 5056, 416, 352, 4672, 224, 160, 96, 24704, 24448, 3904, 3776, 487936, 112384, 3392, 22912
Offset: 1

Views

Author

Labos Elemer, Jul 13 2004

Keywords

Comments

These numbers are clearly analogous to perfect numbers.
sigma(a(n)) mod a(n) = 2*n.

Examples

			a(1) = 6 is the first even perfect number;
a(7) = 24 corresponds to A096821(1) = 24;
a(4) = 151115727449904501489664 = 2^38*(2^39-7) = 274877906944*549755813881;
		

Crossrefs

Extensions

Edited by Max Alekseyev, May 29 2025

A294682 Numbers n such that A294386(n) = 2^(k-1)*(2^k - 2*n - 1) for some k such that 2^k - 2*n - 1 is prime.

Original entry on oeis.org

0, 12, 62, 121, 126, 205, 241, 877, 1021, 1022, 1645, 2041, 2424, 2761, 2791, 2965, 3355, 3445, 3541, 4021, 4081, 4094, 4165, 4825, 5071, 5191, 5251, 5593, 6151, 6385, 6631, 7465, 7765, 7884, 8137, 8188
Offset: 1

Views

Author

Robert Israel, Nov 06 2017

Keywords

Examples

			a(3) = 62 is in the sequence because A294386(62) = 192 = 2^6*3 where 2^7 - 2*62 - 1 = 3 is prime.
		

Crossrefs

Programs

  • Maple
    # Assuming A294386[n] has been assigned for n from 0 to N
    Res:= NULL:
    for n from 0 to N do
      for k from ilog2(2*n+1)+1 do
        p:= 2^k - 2*n-1;
        if 2^(k-1)*p > A294386[n] then break fi;
        if isprime(p) then
          if A294386[n] = 2^(k-1)*p then Res:= Res, n fi;
          break
        fi
      od
    od:
    Res;
Previous Showing 11-15 of 15 results.