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 31-40 of 50 results. Next

A157237 Number of ways to write the n-th positive odd integer in the form p+2^x+11*2^y with p a prime congruent to 1 mod 6 and x,y positive integers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 0, 2, 2, 0, 1, 1, 1, 2, 2, 2, 4, 1, 2, 5, 2, 1, 3, 1, 1, 2, 1, 3, 3, 1, 3, 5, 2, 2, 5, 4, 0, 5, 4, 2, 4, 3, 3, 4, 3, 3
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 25 2009

Keywords

Comments

On Feb. 24, 2009, Zhi-Wei Sun conjectured that a(n)=0 if and only if n<16 or n=18, 21, 24, 51, 84, 1011, 59586; in other words, except for 35, 41, 47, 101, 167, 2021, 119171, any odd integer greater than 30 can be written as the sum of a prime congruent to 1 mod 6, a positive power of 2 and eleven times a positive power of 2. Sun verified the conjecture for odd integers below 5*10^7, and Qing-Hu Hou continued the verification for odd integers below 1.5*10^8 (on Sun's request). Compare the conjecture with Crocker's result that there are infinitely many positive odd integers not of the form p+2^x+2^y with p an odd prime and x,y positive integers.

Examples

			For n=19 the a(19)=2 solutions are 2*19-1=7+2^3+2*11=13+2+2*11.
		

References

  • R. Crocker, On a sum of a prime and two powers of two, Pacific J. Math. 36(1971), 103-107.
  • Z. W. Sun and M. H. Le, Integers not of the form c(2^a+2^b)+p^{alpha}, Acta Arith. 99(2001), 183-190.

Crossrefs

Programs

  • Mathematica
    PQ[x_]:=x>1&&Mod[x,6]==1&&PrimeQ[x] RN[n_]:=Sum[If[PQ[2n-1-11*2^x-2^y],1,0], {x,1,Log[2,(2n-1)/11]},{y,1,Log[2,Max[2,2n-1-11*2^x]]}] Do[Print[n," ",RN[n]],{n,1,200000}]

Formula

a(n)=|{: p+2^x+11*2^y=2n-1 with p a prime congruent to 1 mod 6 and x,y positive integers}|

A188903 a(n) is the least power of 2 such that 2n+1 - a(n) is prime, or 0 if no such prime exists.

Original entry on oeis.org

0, 1, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 16, 2, 2, 4, 8, 2, 4, 2, 2, 4, 2, 4, 16, 2, 4, 16, 2, 2, 4, 8, 2, 4, 2, 2, 4, 8, 2, 4, 2, 4, 16, 2, 4, 16, 8, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 16, 8, 16, 16, 0, 2, 4, 2, 4, 64, 2, 2, 4, 8, 8, 0, 2, 2, 4, 8, 2, 4, 32, 2, 4, 2, 4, 16, 2, 4, 16, 2, 2, 4, 8, 8, 64, 2, 2, 4, 2, 2, 4, 8, 8, 16, 32, 2, 4, 128, 8, 64, 32, 2, 4, 2, 2, 4, 2, 4, 16, 2, 2, 4, 8, 8, 0, 2
Offset: 0

Views

Author

Michel Lagneau, Apr 13 2011

Keywords

Comments

The second Polignac's Conjecture states that every odd positive integer is the sum of a prime and a power of two. This conjecture was proved false, and the smallest counterexample is 127 because subtracting powers of 2 from 127 produces the composite numbers 126, 123, 119, 111, 95, and 63.
The sequence A006285 gives the odd numbers for which the conjecture fails. Hence, a(n) = 0 for n = (A006285(k)-1)/2 = {0, 63, 74, 125, 165, 168, 186, ...}.

Examples

			a(1) = 1 because 2*1 + 1 = 3 = 1 + 2 ;
a(2) = 2 because 2*2 + 1 = 5 = 2 + 3 ;
a(3) = 2 because 2*3 + 1 = 7 = 2 + 5 ;
a(63) = 0 ; a(74) = 0 ; a(125) = 0, ....
		

References

  • David Wells, Prime Numbers: The Most Mysterious Figures In Math, John Wiley & Sons, 2005, p. 175-176.

Crossrefs

Cf. A065381 (primes not of the form p + 2^k, p prime and k >= 0), A156695.

Programs

  • Maple
    with(numtheory):for n from 1 to 126 do:x:=2*n+1:id:=0:for k from 0 to 50 while(id=0)
      do: for q from 1 to 100 while(id=0) do: p:=ithprime(q): y:=2^k+p:if y=x then
      id:=1:printf(`%d, `,2^k):else fi:od:od:if id=0 then printf(`%d, `,0):else fi:od:
  • Mathematica
    Table[d = 2*n + 1; k = 1; While[k < d && ! PrimeQ[d - k], k = 2*k]; If[k < d, k, 0], {n, 0, 126}]
  • Sage
    def A188903(n):
        return next((2**k for k in (0..floor(log(2*n+1,2))) if is_prime(2*n+1-2**k)), 0)
    # D. S. McNeil, Apr 14 2011

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

A268693 Odd numbers that are not of the form p + 2^a + 2^b with b > a > 0, and p prime.

Original entry on oeis.org

1, 3, 5, 7, 255, 15045, 20655, 25755, 39525, 44115, 46665, 65535, 70125, 97155, 100215, 132855, 144465, 162945, 196605, 200175, 277695, 280755, 327675, 441915, 469965, 548505, 688245, 720375, 770355, 773925, 789225, 1017705, 1027395, 1110015, 1114095, 1127355
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 11 2016

Keywords

Comments

This sequence is infinite; in particular, 2^(2^n) - 1 is in this sequence for each n > 2.
Not every member of this sequence greater than 7 is divisible by 255, see A268694.

Crossrefs

Cf. A232565, A268694. Supersequence of A156695.

A304122 Squarefree numbers of the form 2^k + 5^m, where k is a positive integer and m is a nonnegative integer.

Original entry on oeis.org

3, 5, 7, 13, 17, 21, 29, 33, 37, 41, 57, 65, 69, 89, 127, 129, 133, 141, 157, 253, 257, 281, 381, 517, 537, 627, 629, 633, 641, 689, 753, 881, 1049, 1137, 1149, 1649, 2049, 2053, 2073, 2173, 3127, 3129, 3133, 3157, 3189, 3253, 3637, 4097, 4101, 4121
Offset: 1

Views

Author

Zhi-Wei Sun, May 07 2018

Keywords

Comments

The conjecture in A304081 has the following equivalent version: Any even number greater than 4 can be written as the sum of a prime and a term of the current sequence, and also any odd number greater than 8 can be written as the sum of a prime and twice a term of the current sequence.

Examples

			a(1) = 3 since 3 = 2^1 + 5^0 is squarefree.
a(6) = 21 since 21 = 2^4 + 5^1 = 3*7 is squarefree.
		

Crossrefs

Programs

  • Mathematica
    V={}; Do[If[SquareFreeQ[2^k+5^m],V=Append[V,2^k+5^m]],{k,1,12},{m,0,5}];
    LL:=LL=Sort[DeleteDuplicates[V]];
    a[n_]:=a[n]=LL[[n]];
    Table[a[n],{n,1,50}]

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 *)

A152073 a(n) = largest prime < prime(n) such that prime(n) - a(n) is a power of 2, where prime(n) is the n-th prime; a(n) = 0 if no such prime exists.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 13, 29, 29, 37, 41, 43, 37, 43, 59, 59, 67, 71, 71, 79, 73, 89, 97, 101, 103, 107, 109, 0, 127, 73, 137, 0, 149, 149, 131, 163, 157, 163, 179, 127, 191, 193, 197, 179, 191, 223, 227, 229, 223, 239, 0, 241, 199, 13, 269, 269, 277, 281, 277, 179
Offset: 2

Views

Author

Leroy Quet, Nov 23 2008

Keywords

Comments

a(n) = 0 for odd primes prime(n) appearing in A065381.
Primes p(n) for which there is no such prime a(n) (in which case a(n)=0) are listed in A065381 = (2,127,149,251,331,337,373,...). - M. F. Hasler, Nov 23 2008

Examples

			Looking at the primes less than the 10th prime = 29: 29 - 23 = 6, not a power of 2. 29-19 = 10, not a power of 2. 29-17 = 12, not a power of 2. But 29-13 = 16, a power of 2. Since p = 13 is the largest prime p such that 29 - p = a power of 2, then a(10) = 13.
		

Crossrefs

Programs

  • Mathematica
    Table[Max[0, Select[# - 2^Range[0, Log2@#] &@Prime[n], PrimeQ]], {n, 2, 63}] (* Ivan Neretin, Jun 10 2018 *)
  • PARI
    A152073(n)=local( q=n=prime(n)); while( q=precprime(q-1), n-q==1<M. F. Hasler, Nov 23 2008

Extensions

Edited and extended by M. F. Hasler and Ray Chandler, Nov 23 2008

A154421 Number of ways to express n as the sum of an odd prime, a positive Fibonacci number and an even Lucas number.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 3, 2, 5, 2, 5, 2, 4, 3, 4, 4, 5, 2, 6, 2, 7, 5, 7, 3, 9, 3, 9, 4, 7, 3, 6, 4, 9, 3, 10, 3, 8, 4, 6, 5, 8, 6, 8, 3, 9, 4, 8, 6, 8
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 09 2009

Keywords

Comments

On Jan 09 2009, Zhi-Wei Sun conjectured that a(n)>0 for all n=6,7,.... ; in other words, any integer n>5 can be written in the form p+F_s+L_{3t} with p an odd prime, s positive and t nonnegative. [Compare this with the conjecture related to the sequence A154290.] Sun verified the above conjecture up to 5*10^6 and Qing-Hu Hou continued the verification up to 2*10^8. If we set v_0=2, v_1=4 and v_{n+1}=4v_n+v_{n-1} for n=1,2,3,..., then L_{3t}=v_t is at least 4^t for every t=0,1,2,.... On Jan 17 2009, D. S. McNeil found that 36930553345551 cannot be written as the sum of a prime, a Fibonacci number and an even Lucas number.

Examples

			For n=8 the a(8)=3 solutions are 3 + F_4 + L_0, 3 + F_2 + L_3, 5 + F_2 + L_0.
		

References

  • R. Crocker, On a sum of a prime and two powers of two, Pacific J. Math. 36(1971), 103-107.

Crossrefs

Programs

  • Mathematica
    PQ[m_]:=m>2&&PrimeQ[m] RN[n_]:=Sum[If[PQ[n-2*Fibonacci[3x+1]+Fibonacci[3x]-Fibonacci[y]],1,0], {x,0,Log[2,n]},{y,2,2*Log[2,Max[2,n-2*Fibonacci[3x+1]+Fibonacci[3x]]]}] Do[Print[n," ",RN[n]];Continue,{n,1,50000}]

Formula

a(n) = |{: p+F_s+L_{3t}=n with p an odd prime, s>1 and t nonnegative}|.

Extensions

McNeil's counterexample added by Zhi-Wei Sun, Jan 20 2009

A157225 Number of ways to write the n-th positive odd integer in the form p+2^x+7*2^y with p a prime congruent to 5 mod 6 and x,y positive integers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 0, 2, 3, 1, 2, 4, 1, 2, 4, 2, 2, 3, 2, 2, 4, 2, 4, 4, 1, 5, 5, 2, 5, 7, 1, 3, 7, 2, 4, 8, 2, 4, 3, 2, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 25 2009

Keywords

Comments

On Feb. 24, 2009, Zhi-Wei Sun conjectured that a(n)=0 if and only if n<11 or n=13,16,992; in other words, except for 25, 31, 1983, any odd integer greater than 20 can be written as the sum of a prime congruent to 5 mod 6, a positive power of 2 and seven times a positive power of 2. Sun verified the conjecture for odd integers below 5*10^7, and Qing-Hu Hou continued the verification for odd integers below 1.5*10^8 (on Sun's request). Compare the conjecture with Crocker's result that there are infinitely many positive odd integers not of the form p+2^x+2^y with p an odd prime and x,y positive integers.

Examples

			For n=18 the a(18)=3 solutions are 2*18-1=5+2+7*2^2=5+2^4+7*2=17+2^2+7*2.
		

References

  • R. Crocker, On a sum of a prime and two powers of two, Pacific J. Math. 36(1971), 103-107.
  • Z. W. Sun and M. H. Le, Integers not of the form c(2^a+2^b)+p^{alpha}, Acta Arith. 99(2001), 183-190.

Crossrefs

Programs

  • Mathematica
    PQ[x_]:=x>1&&Mod[x,6]==5&&PrimeQ[x] RN[n_]:=Sum[If[PQ[2n-1-7*2^x-2^y],1,0], {x,1,Log[2,(2n-1)/7]},{y,1,Log[2,Max[2,2n-1-7*2^x]]}] Do[Print[n," ",RN[n]],{n,1,200000}]

Formula

a(n)=|{: p+2^x+7*2^y=2n-1 with p a prime congruent to 5 mod 6 and x,y positive integers}|

A157242 Number of ways to write the n-th positive odd integer in the form p+2^x+11*2^y with p a prime congruent to 5 mod 6 and x,y positive integers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 0, 2, 2, 0, 2, 2, 1, 3, 2, 2, 3, 1, 2, 4, 2, 2, 5, 1, 2, 5, 2, 2, 4, 2, 2, 3, 2, 3, 4, 4, 3, 6, 2, 3, 6, 5, 1, 7, 4, 2, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 25 2009

Keywords

Comments

On Feb. 24, 2009, Zhi-Wei Sun conjectured that a(n)=0 if and only if n<15 or n=17, 20, 23, 86, 124; in other words, except for 33, 39, 45, 171 and 247, any odd integer greater than 28 can be written as the sum of a prime p=5 (mod 6), a positive power of 2 and eleven times a positive power of 2. Sun verified the conjecture for odd integers below 5*10^7. Knowing the conjecture from Sun, Qing-Hu Hou and D. S. McNeil have continued the verification for odd integers below 1.5*10^8 and 10^12 respectively, and they have found no counterexample. Compare the conjecture with Crocker's result that there are infinitely many positive odd integers not of the form p+2^x+2^y with p an odd prime and x,y positive integers.

Examples

			For n=18 the a(18)=2 solutions are 2*18-1=5+2^3+2*11=11+2+2*11.
		

References

  • R. Crocker, On a sum of a prime and two powers of two, Pacific J. Math. 36(1971), 103-107.
  • Z. W. Sun and M. H. Le, Integers not of the form c(2^a+2^b)+p^{alpha}, Acta Arith. 99(2001), 183-190.

Crossrefs

Programs

  • Mathematica
    PQ[x_]:=x>1&&Mod[x,6]==5&&PrimeQ[x] RN[n_]:=Sum[If[PQ[2n-1-11*2^x-2^y],1,0], {x,1,Log[2,(2n-1)/11]},{y,1,Log[2,Max[2,2n-1-11*2^x]]}] Do[Print[n," ",RN[n]],{n,1,200000}]

Formula

a(n)=|{: p+2^x+11*2^y=2n-1 with p a prime congruent to 5 mod 6 and x,y positive integers}|
Previous Showing 31-40 of 50 results. Next