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.

Showing 1-3 of 3 results.

A241758 Smallest prime in representation 2*A241757(n) by sum of two primes, the adding of which in binary requires only one carry.

Original entry on oeis.org

2, 5, 13, 5, 17, 17, 5, 17, 5, 5, 13, 17, 5, 13, 5, 17, 37, 17, 5, 13, 17, 17, 29, 37, 41, 5, 5, 17, 13, 5, 13, 17, 5, 37, 41, 17, 5, 73, 5, 89, 13, 97, 5, 13, 17, 37, 41, 29, 137, 5, 5, 41, 5, 41, 13, 193, 5, 5, 17, 193, 17, 17, 37, 41, 37, 97, 53, 73, 53, 5
Offset: 1

Views

Author

Vladimir Shevelev, Apr 28 2014

Keywords

Examples

			a(2)=5, since A241757(2)=22=5+17, and in binary in sum of 101+10001 involves only one carry.
		

Crossrefs

Formula

2||Binomial(2*A241757(n), a(n)). Indeed, from the Kummer theorem (see reference) 2^t||Binomial(n,x) if and only if in adding x and n-x in binary we have exactly t carries. A proof of the Kummer theorem in arbitrary base one can find in [Fraenkel & Kontorovich].

Extensions

More terms from Peter J. C. Moses, Apr 29 2014

A108421 Smallest number of ones needed to write in binary representation 2*n as sum of two primes.

Original entry on oeis.org

2, 4, 4, 4, 5, 5, 5, 5, 4, 4, 5, 6, 5, 5, 6, 4, 5, 6, 5, 5, 5, 5, 6, 6, 6, 5, 6, 5, 6, 7, 7, 7, 8, 5, 5, 6, 5, 5, 6, 6, 5, 6, 6, 5, 6, 6, 7, 8, 5, 5, 6, 6, 6, 6, 7, 5, 6, 6, 7, 8, 7, 7, 8, 6, 7, 5, 5, 6, 5, 5, 6, 6, 5, 6, 6, 5, 6, 7, 7, 7, 6, 6, 6, 6, 6, 6, 7, 6, 6, 7, 7, 7, 8, 7, 8, 6, 5, 5, 6, 6, 6, 6, 7, 5, 6
Offset: 2

Views

Author

Reinhard Zumkeller, Jun 03 2005

Keywords

Comments

a(n) = Min{A000120(p)+A000120(q) : p,q prime and p+q=2*n}.
a(n) = A108422(n) - A108423(n).
a(n) >= A000120(n)+1, with equality for n in A241757. - Robert Israel, Mar 25 2018

Examples

			n=15: 2*15=30 and A002375(15)=3 with 30=7+23=11+19=13+17,
13+17 -> 1101+10001 needs a(15)=5 binary ones, whereas
7+23 -> 111+10111 and 11+19 -> 1011+10011 need more.
		

Crossrefs

Programs

  • Maple
    N:= 200: # to get a(2)..a(N)
    Primes:= select(isprime, [seq(i,i=3..2*N-3,2)]):
    Ones:= map(t -> convert(convert(t,base,2),`+`), Primes):
    V:= Vector(N): V[2]:= 2:
    for i from 1 to nops(Primes) do
      p:= Primes[i];
      for j from 1 to i do
        k:= (p+Primes[j])/2;
        if k > N then break fi;
        t:= Ones[i]+Ones[j];
        if V[k] = 0 or t < V[k] then V[k]:= t fi
      od
    od:
    convert(V[2..N],list); # Robert Israel, Mar 25 2018
  • Mathematica
    Min[#]&/@(Table[Total[Flatten[IntegerDigits[#,2]]]&/@Select[ IntegerPartitions[ 2*n,{2}],AllTrue[#,PrimeQ]&],{n,2,110}]) (* Harvey P. Dale, Jul 27 2020 *)

A241856 Smallest number of carries while adding two primes in binary, the sum of which is 2*n.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Apr 30 2014

Keywords

Examples

			Let n=5. We have 2*5=10=3+7=5+5. Adding 3+7 in binary requires 3 carries, while adding 5+5 in binary requires 2 carries. Thus a(5)=2.
		

Crossrefs

Extensions

More terms from Peter J. C. Moses, Apr 30 2014
Showing 1-3 of 3 results.