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

A154536 Positive integers that can be written as the sum of a positive Pell number and twice a positive Pell number.

Original entry on oeis.org

3, 4, 5, 6, 7, 9, 11, 12, 14, 15, 16, 22, 25, 26, 29, 31, 33, 36, 39, 53, 59, 60, 63, 70, 72, 74, 80, 87, 94, 128, 141, 142, 145, 152, 169, 171, 173, 179, 193, 210, 227, 309, 339, 340, 343, 350, 367, 408, 410, 412
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 11 2009

Keywords

Comments

On Jan 10 2009, Zhi-Wei Sun conjectured that any integer greater than 5 can be expressed as the sum of an odd prime and a term in the above sequence; in other words, each n=6,7,... can be written in the form p+P_s+2*P_t with p an odd prime and s,t>0. This has been verified up to 5*10^13 by D. S. McNeil (from London Univ.). Motivated by this conjecture, Qing-Hu Hou (from Nankai Univ.) observed and Zhi-Wei Sun proved that each term a(n) in the above sequence can be uniquely written in the form P_s+2P_t with s,t>0. Sun noted that 2176 cannot be written as the sum of a prime and two Pell numbers; D. S. McNeil found that 393185153350 cannot be written in the form p+P_s+3P_t and 872377759846 cannot be written in the form p+P_s+4P_t, where p is a prime and s and t are nonnegative.
Zhi-Wei Sun has offered a monetary reward for settling this conjecture.

Examples

			For n=12 the a(12)=22 solution is 22 = P_4 + 2*P_3.
		

References

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

Crossrefs

Programs

  • Mathematica
    P[n_]:=P[n]=2*P[n-1]+P[n-2] P[0]=0 P[1]=1 i:=0 Do[Do[If[n==2*P[x]+P[y],i=i+1;Print[i," ",n]], {x,1,Max[1,Log[2,n]]},{y,1,Log[2,n]+1}]; Continue,{n,1,100000}]

Extensions

Mentioned McNeil's verification record for the representation n = p + P_s + 2P_t and his examples for n not of the form p + P_s + 3P_t and n not of the form p + P_s + 4P_t. - Zhi-Wei Sun, Jan 17 2009
D. S. McNeil has verified the conjecture up to 5*10^13. - Zhi-Wei Sun, Jan 20 2009

A154404 Number of ways to express n as the sum of an odd prime, a positive Fibonacci number and a Catalan number.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 3, 5, 5, 5, 4, 6, 5, 6, 5, 7, 6, 6, 9, 9, 8, 8, 6, 8, 10, 9, 6, 9, 7, 5, 8, 10, 8, 8, 7, 6, 9, 9, 8, 8, 7, 6, 9, 9, 13, 10, 9, 8, 12, 10, 10, 10, 9, 9, 11, 9, 11, 9, 10, 8, 11, 13, 11, 10, 12, 11, 11, 10, 10, 7, 8, 10, 14, 10, 16, 11, 9, 11, 11, 10, 12, 10, 7, 9, 16, 10, 12
Offset: 1

Views

Author

Qing-Hu Hou (hou(AT)nankai.edu.cn), Jan 09 2009, Jan 18 2009

Keywords

Comments

Motivated by Zhi-Wei Sun's conjecture that each integer n>4 can be expressed as the sum of an odd prime, an odd Fibonacci number and a positive Fibonacci number (cf. A154257), during their visit to Nanjing Univ. Qing-Hu Hou (Nankai Univ.) and Jiang Zeng (Univ. of Lyon-I) conjectured on Jan 09 2009 that a(n)>0 for every n=5,6,.... and verified this up to 5*10^8. D. S. McNeil has verified the conjecture up to 5*10^13 and Hou and Zeng have offered prizes for settling their conjecture (see Sun 2009).

Examples

			For n=7 the a(7)=3 solutions are 3+2+2, 3+3+1, 5+1+1.
		

References

  • R. Crocker, On a sum of a prime and two powers of two, Pacific J. Math. 36(1971), 103-107.
  • R. P. Stanley, Enumerative Combinatorics, Vol. II, Cambridge Univ. Press, 1999, Chapter 6.

Crossrefs

Programs

  • Maple
    Cata:=proc(n) binomial(2*n,n)/(n+1); end proc: Fibo:=proc(n) if n=1 then return(1); elif n=2 then return(2); else return(Fibo(n-1) + Fibo(n-2)); fi; end proc: for n from 1 to 10^3 do rep_num:=0; for i from 1 while Fibo(i) < n do for j from 1 while Fibo(i)+Cata(j) < n do p:=n-Fibo(i)-Cata(j); if (p>2) and isprime(p) then rep_num:=rep_num+1; fi; od; od; printf("%d %d\n", n, rep_num); od:
  • Mathematica
    a[n_] := (pp = {}; p = 2; While[ Prime[p] < n, AppendTo[pp, Prime[p++]] ]; ff = {}; f = 2; While[ Fibonacci[f] < n, AppendTo[ff, Fibonacci[f++]]]; cc = {}; c = 1; While[ CatalanNumber[c] < n, AppendTo[cc, CatalanNumber[c++]]]; Count[Outer[Plus, pp, ff, cc], n, 3]); Table[a[n], {n, 1, 88}] (* Jean-François Alcover, Nov 22 2011 *)
  • PARI
    a(n)=my(i=1,j,f,c,t,s);while((f=fibonacci(i++))Charles R Greathouse IV, Nov 22 2011

Formula

a(n) = |{: p+F_s+C_t=n with p an odd prime and s>1}|.

Extensions

More terms from Jon E. Schoenfield, Jan 17 2009
Added the new verification record and Hou and Zeng's prize for settling the conjecture. Edited by Zhi-Wei Sun, Feb 01 2009
Comment edited by Charles R Greathouse IV, Oct 28 2009

A155114 Number of ways to express n as the sum of an odd prime, a positive Fibonacci number and twice a positive Fibonacci number.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 3, 2, 6, 3, 7, 3, 8, 5, 8, 6, 10, 5, 11, 6, 13, 7, 13, 7, 14, 5, 14, 7, 15, 8, 14, 4, 18, 8, 17, 7, 15, 5, 15, 11, 16, 8, 15, 7, 17, 12, 19, 10, 20, 10, 17, 10, 17, 13, 15, 11, 18, 8, 20, 10, 17, 9, 18, 11, 21, 11, 21, 7, 20, 11, 18, 11, 22, 9, 25, 11, 24, 13, 19, 14, 20, 11
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 20 2009

Keywords

Comments

Motivated by his conjecture related to A154257, on Dec 26 2008, Zhi-Wei Sun conjectured that a(n)>0 for n=6,7,... On Jan 15 2009, D. S. McNeil verified this up to 10^12 and found no counterexamples. See the sequence A154536 for another conjecture of this sort. Sun also conjectured that any integer n>7 can be written as the sum of an odd prime, twice a positive Fibonacci number and the square of a positive Fibonacci number; this has been verified up to 2*10^8.

Examples

			For n=10 the a(10)=6 solutions are 3 + F_4 + 2F_3, 3 + F_5 + 2F_2, 3 + F_2 + 2F_4, 5 + F_2 + 2F_3, 5 + F_4 + 2F_2, 7 + F_2 + 2F_2.
		

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[x]-Fibonacci[y]],1,0], {x,2,2*Log[2,Max[2,n/2]]},{y,2,2*Log[2,Max[2,n-2*Fibonacci[x]]]}] Do[Print[n," ",RN[n]];Continue,{n,1,100000}]

Formula

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

A232398 Number of ways to write n = p + (2^k - k) + (2^m - m) with p prime and 0 < k <= m.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 23 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
This was motivated by A231201. We have verified the conjecture for n up to 2*10^8. It seems that a(n) = 1 for no odd n.
In contrast, R. Crocker proved that there are infinitely many positive odd numbers not of the form p + 2^k + 2^m with p prime and k, m > 0.
It seems that any integer n > 3 not equal to 1361802 can be written in the form p + (2^k + k) + (2^m + m), where p is a prime, and k and m are nonnegative integers.
On Dec 08 2013, Qing-Hu Hou finished checking the conjecture for n up to 10^10 and found no counterexamples. - Zhi-Wei Sun, Dec 08 2013

Examples

			a(11) = 2 since 11 = 5 + (2 - 1) + (2^3 - 3) = 7 + (2^2 - 2) + (2^2 - 2) with 5 and 7 prime.
a(28) = 1 since 28 = 11 + (2^3 - 3) + (2^4 - 4) with 11 prime.
a(94) = 1 since 94 = 31 + (2^3 - 3) + (2^6 - 6) with 31 prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>0&&PrimeQ[n]
    A232398[n_] := Sum[If[2^m - m < n && PQ[n - 2^m + m - 2^k + k], 1, 0], {m, Log[2, 2n]}, {k, m}]; Table[A232398[n], {n, 100}]

A058517 Positive even numbers not of the form prime + 3^x.

Original entry on oeis.org

2, 36, 66, 78, 96, 120, 126, 144, 156, 162, 186, 204, 210, 216, 222, 276, 288, 300, 306, 324, 328, 330, 336, 342, 366, 372, 378, 396, 408, 414, 426, 438, 456, 474, 486, 498, 516, 528, 534, 540, 546, 552, 562, 576, 582, 606, 612, 624, 630, 636, 666, 672, 690
Offset: 1

Views

Author

Robert G. Wilson v, Dec 21 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ i = 0; l = Ceiling[ N[ Log[ 3, n ] ] ]; While[ ! PrimeQ[ n - 3^i ] && i < l, i++ ]; If[ i == l, Print[ n ] ], {n, 2, 1000, 2} ]
  • PARI
    isok(n) = {if (n % 2, 0, lim = log(n)/log(3); for (k=0, lim, if (isprime(n - 3^k), return (0)););1;);} \\ Michel Marcus, Feb 25 2017

A118954 Numbers that cannot be written as 2^k + prime.

Original entry on oeis.org

1, 2, 16, 22, 26, 28, 36, 40, 46, 50, 52, 56, 58, 64, 70, 76, 78, 82, 86, 88, 92, 94, 96, 100, 106, 112, 116, 118, 120, 122, 124, 126, 127, 134, 136, 142, 144, 146, 148, 149, 154, 156, 160, 162, 166, 170, 172, 176, 178, 184, 186, 188, 190, 196, 202, 204, 206, 208
Offset: 1

Views

Author

Reinhard Zumkeller, May 07 2006

Keywords

Comments

A109925(a(n)) = 0.

Crossrefs

Complement of A118955. Subsequence of A118956. Supersequence of A006285.

Programs

  • Haskell
    a118954 n = a118954_list !! (n-1)
    a118954_list = filter f [1..] where
       f x = all (== 0) $ map (a010051 . (x -)) $ takeWhile (< x) a000079_list
    -- Reinhard Zumkeller, Jan 03 2014
    
  • Magma
    lst:=[]; for n in [1..208] do k:=-1; repeat k+:=1; a:=n-2^k; until a lt 1 or IsPrime(a); if a lt 1 then Append(~lst, n); end if; end for; lst; // Arkadiusz Wesolowski, Sep 02 2016
  • PARI
    is(n)=my(k=1);while(kCharles R Greathouse IV, Sep 01 2015
    

Formula

n < a(n) < kn for some k < 2 and all large enough n, see Romanoff and either Erdős or van der Corput. - Charles R Greathouse IV, Sep 01 2015

A078687 Number of x>=0 such that prime(n)-2^x is prime.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Dec 17 2002

Keywords

Examples

			prime(17)=59 and only 59-2^3 = 53 is prime hence a(17)=1
		

Crossrefs

Cf. A156695.

Programs

  • Mathematica
    f[p_] := Block[{c = exp = 0, lmt = 1 + Floor@ Log2@ p}, While[exp < lmt, If[ PrimeQ[p - 2^exp], c++]; exp++]; c]; Array[ f@ Prime@# &, 105] (* Robert G. Wilson v, Jul 07 2014 *)
  • PARI
    a(n)=sum(i=0,floor(log(prime(n))/log(2)),if(isprime(prime(n)-2^i),1,0))

Formula

a(A049084(A065381(n)))=0, a(A049084(A065380(n)))=1; A118953(n)<=a(n); a(n)=A109925(A000040(n)). - Reinhard Zumkeller, May 07 2006

A154940 Number of ways to express n as the sum of an odd prime, a Lucas number and a Catalan number.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 4, 5, 5, 6, 5, 5, 5, 7, 7, 6, 5, 9, 8, 8, 9, 10, 7, 9, 10, 7, 9, 7, 6, 7, 9, 7, 9, 11, 9, 9, 8, 8, 7, 7, 7, 8, 8, 9, 11, 10, 10, 13, 12, 10, 10, 10, 10, 10, 14, 9, 7, 11, 11, 9, 14, 12, 10, 12, 13, 9, 11, 8, 7, 10, 12, 10, 12, 12, 12, 12, 11, 11, 12, 8, 11, 11, 14, 10, 13, 10
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 17 2009

Keywords

Comments

On Jan 16 2009, Zhi-Wei Sun conjectured that a(n)>0 for n=5,6,... and verified this up to 5*10^6. (Sun also thought that lim inf_n a(n)/log(n) is a positive constant.) D. S. McNeil continued the verification up to 10^13 and found no counterexamples. The conjecture is similar to a conjecture of Qing-Hu Hou and Jiang Zeng related to the sequence A154404; both conjectures were motivated by Sun's recent conjecture on sums of primes and Fibonacci numbers (cf. A154257).

Examples

			For n=10 the a(10)=5 solutions are 3 + L_0 + C_3, 5 + L_2 + C_2, 5 + L_3 + C_1, 7 + L_0 + C_1, 7 + L_1 + C_2.
		

References

  • R. Crocker, On a sum of a prime and two powers of two, Pacific J. Math. 36(1971), 103-107.
  • R. P. Stanley, Enumerative Combinatorics, Vol. II, Cambridge Univ. Press, 1999, Chapter 6.

Crossrefs

Programs

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

Formula

a(n) = |{: p+L_s+C_t=n with p an odd prime, s>=0 and t>0}|.

Extensions

More terms (from b-file) added by N. J. A. Sloane, Aug 31 2009

A304031 Number of ways to write 2*n as p + 2^k + 5^m with p prime and 2^k + 5^m a product of at most three distinct primes, where k and m are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 04 2018

Keywords

Comments

a(n) > 0 for all 1 < n <= 10^10 with the only exception n = 3114603841, and 2*3114603841 = 6219442049 + 2^3 + 5^10 with 6219442049 prime and 2^3 + 5^10 = 3*17*419*457 squarefree.
Note that a(n) <= A303934(n) <= A303821(n).

Examples

			a(3) = 1 since 2*3 = 3 + 2^1 + 5^0 with 3 = 2^1 + 5^0  prime.
a(7) = 2 since 2*7 = 7 + 2^1 + 5^1 with 7 = 2^1 + 5^1 prime, and 2*7 = 11 + 2^1 + 5^0 with 11 and 2^1 + 5^0 both prime.
a(42908) = 2 since 2*42908 = 85751 + 2^6 + 5^0 with 85751 prime and 2^6 + 5^0 = 5*13, and 2*42908 = 69431 + 2^14 + 5^0 with 69431 prime and 2^14 + 5^0 = 5*29*113.
		

Crossrefs

Programs

  • Mathematica
    qq[n_]:=qq[n]=SquareFreeQ[n]&&Length[FactorInteger[n]]<=3;
    tab={};Do[r=0;Do[If[qq[2^k+5^m]&&PrimeQ[2n-2^k-5^m],r=r+1],{k,0,Log[2,2n-1]},{m,0,Log[5,2n-2^k]}];tab=Append[tab,r],{n,1,90}];Print[tab]

A098237 Composite de Polignac numbers (A006285).

Original entry on oeis.org

905, 959, 1199, 1207, 1211, 1243, 1271, 1477, 1529, 1541, 1589, 1649, 1719, 1807, 1829, 1859, 1927, 1969, 1985, 2171, 2231, 2263, 2279, 2429, 2465, 2669, 2983, 2993, 3029, 3149, 3215, 3239, 3341, 3353, 3431, 3505, 3665, 3817, 3845, 3985
Offset: 1

Views

Author

Ralf Stephan, Aug 31 2004

Keywords

Comments

Odd composites that are not the sum of a prime and a power of two.

Crossrefs

Programs

  • Haskell
    a098237 n = a098237_list !! (n-1)
    a098237_list = filter ((== 0) . a109925) a071904_list
    -- Reinhard Zumkeller, May 27 2015
Previous Showing 11-20 of 50 results. Next