[go: up one dir, main page]

login
A185447
Least prime such that whenever 2*a(n) is the sum of two primes, none of them is in the set F such that Sum_{p in F} 2^primepi(p-1) = n.
1
3, 2, 19, 2, 3, 2, 19, 2, 3, 2, 29, 2, 3, 2, 61, 2, 3, 2, 19, 2, 3, 2, 19, 2, 3, 2, 61, 2, 3, 2, 61, 2, 3, 2, 19, 2, 3, 2, 19, 2, 3, 2, 29, 2, 3, 2, 151, 2, 3, 2, 19, 2, 3, 2, 19, 2, 3, 2, 149, 2, 3, 2, 151, 2, 3, 2, 19, 2, 3, 2, 19, 2, 3, 2, 47, 2, 3, 2, 61, 2, 3, 2, 19, 2, 3, 2, 19, 2, 3, 2, 61, 2, 3, 2, 61, 2, 3, 2, 19
OFFSET
1,1
COMMENTS
The set F=F(n) of primes corresponding to a(n) is such that its characteristic function, within the set of primes, is the binary expansion of n: F={ prime(i[1]),...,prime(i[m]) } <=> n = 2^(i[1]-1) + ... + 2^(i[m]-1). Otherwise said, the set F is the set of prime factors of A019565(n) = Product_(prime(i)^bittest(n,i-1)).
LINKS
D. Skordev et al., On the representation of some even numbers as sums of two prime numbers, in "primenumbers" yahoo group, Feb 02 2011.
Dimiter Skordev and others, On the representation of some even numbers as sums of two prime numbers, digest of 11 messages in primenumbers Yahoo group, Feb 2, 2011 - Feb 3, 2011.
FORMULA
a(2k) = 2; a(4k-3) = 3; a(2^k-1) = A185446(n) > prime(n).
EXAMPLE
For n=3, we look for the least prime P which cannot be written as sum of two primes involving prime(1)=2 or prime(2)=3 (since n=3=2^0+2^1). See A185446 for details about a(3)=19.
If n is even, this means the set F does not contain 2, and therefore a(n)=2 since 2*2 can only be written as 2+2, using primes not in F.
If n=4k-3, its binary expansion ends in ...01, i.e., the set F does contain prime(1)=2, but not prime(2)=3. Therefore a(n)=3, since 2*3 can only be written as 3+3, using primes not in F.
PROG
(PARI) {a(n) = forprime( p=2, default(primelimit),
bittest(n, primepi(p-1))&next; /*if p is in F, then 2p = p+p */
forprime(q=2, p-1 /* no need to test p+p */,
isprime(2*p-q) | next /* not sum of 2 primes */;
! bittest(n, primepi(q-1)) /* q not in F */
& ! bittest(n, primepi(2*p-q-1)) & next; /* ok: both not in F */
/* one among q, 2p-q is in F: this p is not good:*/ next(2));
/* this p*2 had no decomposition of the form q+r with q or r in F */
return(p))}
CROSSREFS
Sequence in context: A092644 A006281 A157705 * A317831 A078073 A317927
KEYWORD
nonn
AUTHOR
M. F. Hasler, Feb 03 2011
STATUS
approved