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 21-30 of 38 results. Next

A232460 a(n) = 2^(2^n) - 5.

Original entry on oeis.org

-3, -1, 11, 251, 65531, 4294967291, 18446744073709551611, 340282366920938463463374607431768211451, 115792089237316195423570985008687907853269984665640564039457584007913129639931
Offset: 0

Views

Author

Arkadiusz Wesolowski, Nov 24 2013

Keywords

Comments

For n >= 3, a(n) is not of the form 2^k + p, where p is a prime. Therefore every term greater than 11 is in A006285 (de Polignac numbers).

Crossrefs

Cf. A006285.

Programs

  • Magma
    [2^(2^n)-5 : n in [0..8]]
    
  • Mathematica
    Table[2^(2^n) - 5, {n, 0, 8}]
  • PARI
    for(n=0, 8, print1(2^(2^n)-5, ", "));
    
  • Python
    def A232460(n): return (1<<(1<Chai Wah Wu, Jul 19 2022

Formula

a(n) = A000215(n) - 6.
a(0) = - 3; a(n) = (a(n-1) + 5)^2 - 5, n >= 1.

A232565 a(n) is the smallest k such that 2^(2^n) - 2^k - 1 is prime, or -1 if no such k exists.

Original entry on oeis.org

0, 1, 2, 4, 2, 8, 18, 76, 32, 151, 692, 592, 154, 580, 27365, 11267
Offset: 1

Views

Author

Keywords

Comments

Crocker showed that 2^(2^n) - 1 - 2^a - 2^b is not prime (with n > 2) if a and b are distinct. This sequence demonstrates that the theorem is sharp in the sense that distinctness is required.
If n > 2, then the (largest) prime P(n) = 2^(2^n)-2^a(n)-1 is a de Polignac number (A065381); i.e., P(n)-2^m is not prime. It seems that if n > 6, then |P(n)-2^m| is composite for every natural m and P(n)*2^m-1 is composite (by the dual Riesel conjecture). So if n > 6, then the prime P(n) may be a Riesel number (A182296). For example, the prime P(7) = 2^(2^7)-(2^18+1) is the first candidate (note that 2^18+1 is the smallest de Polignac number of form 2^k+1). Also, by Crocker's theorem, the smallest number of form 2^(2^n)-2^m-1, namely 2^(2^n-1)-1 is a de Polignac number (A006285) and for n > 6 may be a dual Riesel number (A101036). For example, the double Mersenne prime 2^(2^7-1)-1 probably is a dual Riesel number. It is not known whether these are Riesel numbers with a covering set. - Thomas Ordowski, Jan 24 2024

Crossrefs

Cf. A156695.

Programs

  • PARI
    a(n)=my(N=2^2^n-1);for(a=1,2^n-1,if(ispseudoprime(N-2^a), return(a)));0

Extensions

a(15) from Charles R Greathouse IV, Dec 02 2013
a(16) from Daniel Suteu, Oct 11 2020
Name edited by Thomas Ordowski, Jan 24 2024

A337487 De Polignac numbers k > 1 such that k - 2^m is a de Polignac number for every 1 < 2^m < k.

Original entry on oeis.org

1117175145, 2544265305, 3147056235, 3366991695, 3472109835, 3621922845, 3861518805, 4447794915, 4848148485, 5415281745, 5693877405, 7525056375, 7602256605, 9055691835, 9217432215, 13431856995, 16819230075, 19373391165, 21468020835, 24358769685, 27002844795, 30252463305, 33359739795
Offset: 1

Views

Author

Thomas Ordowski, Aug 29 2020

Keywords

Comments

Odd integers k > 3 that are not of the form p + 2^m + 2^n with m,n >= 0, where p is a prime.
These are de Polignac numbers k > 1 in A156695. Numbers k in A156695 such that k - 2 is composite.
Problem: are there infinitely many such numbers?

Crossrefs

An intersection of A006285 > 1 and A156695 (with m,n >= 1).

Programs

  • Mathematica
    A156695 = Cases[Import["https://oeis.org/A156695/b156695.txt", "Table"], {, }][[;; , 2]]; dePolQ[n_] := n > 3 && AllTrue[n - 2^Range[Floor[Log[2, n]]], !PrimeQ[#] &]; Select[A156695, dePolQ] (* Amiram Eldar, Aug 29 2020 *)

A212292 Odd numbers not of the form p^2 + q^2 + r with p, q, and r prime.

Original entry on oeis.org

1, 3, 5, 7, 9, 17, 33, 43, 83, 179, 623, 713, 1019
Offset: 1

Views

Author

Keywords

Comments

The corresponding sequence with the restriction to primes removed is empty.
Wang shows that all but x^{9/20+e} members of this sequence up to x are congruent to 2 mod 3, for any e > 0.
There are no more terms < 10^7. - Donovan Johnson, Jun 27 2012
There are no more terms < 4*10^9. - Jud McCranie, Jun 09 2013
There are no more terms < 10^11. - Giovanni Resta, Jun 09 2013

References

  • Wang Mingqiang, On sums of a prime, and a square of prime, and a k-power of prime, Northeastern Mathematical Journal 18:4 (2002), pp. 283-286.

Crossrefs

Programs

  • PARI
    list(lim)=my(p1=vector(primepi(sqrt(lim-5.5)),i,prime(i)^2), p2=List(), v=List(), u=List([1,3,5,7,9]), t); for(i=1,#p1, for(j=i,#p1,t=p1[i]+p1[j]; if(t>lim, break, listput(p2,t)))); p2=vecsort(Vec(p2),,8); for(i=1,#p2,forprime(p=2,lim-p2[i],listput(v,p2[i]+p))); v=select(n->n%2, vecsort(Vec(v),,8)); for(i=2,#v,forstep(j=v[i-1]+2,v[i]-2,2,listput(u,j))); Vec(u)

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

A256237 Primes p such that for all 2^k < p the numbers p + 2^k, p - 2^k, p*2^k + 1, and p*2^k - 1 are composite.

Original entry on oeis.org

8923, 24943, 35437, 42533, 52783, 83437, 105953, 116437, 126631, 133241, 145589, 164729, 172331, 192173, 204013, 215279, 254329, 304709, 308899, 398833, 430499, 436687, 454351, 476869, 479909, 483443, 497597, 522479, 527729, 529103, 545257, 561439, 562651
Offset: 1

Views

Author

Arkadiusz Wesolowski, Mar 20 2015

Keywords

Crossrefs

Subsequence of A256163.

Programs

  • Magma
    lst:=[]; for p in [3..562651 by 2] do if IsPrime(p) then t:=0; k:=0; while 2^k lt p do if IsPrime(p-2^k) or IsPrime(p+2^k) or IsPrime(p*2^k-1) or IsPrime(p*2^k+1) then t:=1; break; end if; k+:=1; end while; if IsZero(t) then Append(~lst, p); end if; end if; end for; lst;

A276417 a(n) = least positive k such that (2*n + 1) - 2^k is prime, or 0 if no such k exists.

Original entry on oeis.org

0, 0, 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, 0, 1, 2, 1, 2, 6, 1, 1, 2, 3, 3, 0, 1, 1, 2, 3, 1, 2, 5, 1, 2, 1, 2, 4
Offset: 0

Views

Author

Arkadiusz Wesolowski, Sep 02 2016

Keywords

Comments

a(n) = 1 iff n is in A006254. - Robert Israel, Sep 02 2016
For n > 1, a(n) = 0 iff 2n+1 is de Polignac number, A006285. - Thomas Ordowski, Apr 13 2017

Examples

			a(14) = 4 because (2*14 + 1) - 2^k is composite for k = 1, 2, 3 and prime for k = 4.
		

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [1..173 by 2] do k:=0; c:=k; repeat k+:=1; c+:=1; a:=n-2^k; until a lt 1 or IsPrime(a); if a lt 1 then Append(~lst, 0); else Append(~lst, c); end if; end for; lst;
    
  • Maple
    f:= proc(n) local k;
         for k from 1 do
           if 2*n < 2^k then return 0
           elif isprime(2*n+1-2^k) then return k
           fi
         od
    end proc:
    map(f, [$0..100]); # Robert Israel, Sep 02 2016
  • Mathematica
    Table[If[n <= 2, 0, k = 1; While[! PrimeQ[2 n + 1 - 2^k], k++]; k], {n, 0, 120}] (* Michael De Vlieger, Sep 03 2016 *)
  • PARI
    a(n) = my(k=1); while(2^k < 2*n+1, if(ispseudoprime((2*n+1)-2^k), return(k)); k++); return(0) \\ Felix Fröhlich, Sep 02 2016

Formula

If A188903(n) >= 2, then a(n) = log_2(A188903(n)), otherwise a(n) = 0.

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

A006286 Numbers not of form p + 2^x + 2^y.

Original entry on oeis.org

1, 2, 3, 128, 150, 252, 332, 338, 374, 510, 600, 702, 758, 810, 878, 906, 908, 960, 978, 998, 1020, 1088, 1200, 1208, 1212, 1244, 1260, 1272, 1478, 1530, 1542, 1550, 1590, 1598, 1620, 1650, 1658, 1720, 1760, 1778, 1784, 1808, 1830, 1860, 1868
Offset: 1

Views

Author

Keywords

References

  • Jeffrey Shallit, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

More terms from Sean A. Irvine, Feb 22 2017
Previous Showing 21-30 of 38 results. Next