The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A277428 a(n) = the n-bit number in which the i-th bit is 1 if and only if prime(i) divides A060795(n). 0
 0, 1, 4, 9, 11, 22, 75, 105, 449, 425, 1426, 2837, 4765, 2775, 21895, 57558, 87602, 145177, 123788, 694479, 677326, 1516496, 3363284, 2048443, 26968428, 24488513, 98733728 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS a(n) is also the n-bit number in which the i-th bit is 1 if and only if prime(i) does not divide A060796(n). a(n) is also the encoding of the fraction defined as follows: Consider the set of fractions that can be built by only using each prime number from prime(1) to prime(n) exactly once as factors, either in the numerator or in the numerator. There are 2^n such fractions. One of them, let's call it x, has the property of yielding the result nearest to 1. a(n) is the n-bit number in which the i-th bit is 1 if prime(i) appears in the numerator of x, 0 if prime(i) appears in the denominator of x. Remark: x is A060795(n) / A060796(n). Notice how in this prime-rank-to-bit representation, A060795(n) and A060796(n) are each other's bitwise negation. LINKS EXAMPLE For n = 1, two distinct fractions can be written with the first prime number, namely 1/2 and 2. Of the two, 1/2 is nearer to 1. 1/2 has its 2 below the fraction bar, so its binary encoding is 0, which yields a(1) = 0. For n = 2, four distinct fractions can be written with the first two prime numbers, namely 1/6, 2/3, 3/2 and 6. 2/3 is the nearest to 1. 2/3 has its 2 above the fraction bar and its 3 below, so its encoding is 01, which yields a(2) = 1. MATHEMATICA {0}~Join~Table[Function[p, FromDigits[#, 2] &@ Reverse@ MapAt[# + 1 &, ConstantArray[0, n], Partition[#, 1, 1]] &@ PrimePi@ FactorInteger[Numerator@ #][[All, 1]] &@ Max@ Select[Map[p/#^2 &, Divisors@ p], # < 1 &]][Times @@ Prime@ Range@ n], {n, 2, 23}] (* Michael De Vlieger, Oct 19 2016 *) PROG (Java) package oeis; public class BinaryEncodedBestPrimeSetup {   // Brute force implementation... Can it be improved? public static int PRIME[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, /* to be continued */ }; public static void main(String args[]) {   int nMax = PRIME.length; // number of terms of the sequence   for (int n = 1; n <= nMax; n ++) {    if (n > 1) {     System.out.print(", ");    }    System.out.print(u(n));   } } private static int u(int n) {   double bestMul = 0.0;   int bestSetup = -1;   int s = 0; // binary-encoded setup number   for (s = 0; s < (1 << n); s ++) {    double mul = 1.0;    int i = 0; // prime number #    for (i = 0; i < n; i ++) {     if ((s & (1 << i)) != 0) {      mul *= PRIME[i]; // 1 = above fraction bar     } else {      mul /= PRIME[i]; // 0 = below fraction bar     }    }    if (mul < 1.0) {     if (mul > bestMul) {      bestMul = mul;      bestSetup = s;     }    }   }   return bestSetup; } } (PARI) a060795(n) = my(m=prod(i=1, n, prime(i))); divisors(m)[numdiv(m)\2]; a(n) = {my(a95 = a060795(n)); v = vector(n, i, (a95 % prime(i))==0); subst(Polrev(v), x, 2); } \\ Michel Marcus, Dec 03 2016 CROSSREFS Encodes A060795 and A060796. Cf. A002110, A261144. Sequence in context: A312847 A141365 A179055 * A002641 A085724 A106854 Adjacent sequences:  A277425 A277426 A277427 * A277429 A277430 A277431 KEYWORD nonn,base,more AUTHOR Luc Rousseau, Oct 14 2016 EXTENSIONS a(22)-a(27) from Michael De Vlieger, Oct 19 2016 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 29 19:29 EDT 2020. Contains 338069 sequences. (Running on oeis4.)