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.

A205601 Goldbach's problem extended to division: number of decompositions of 2n into the floor of unordered ratios of two primes, floor(q/p) = 2n, where p < 2n < q.

This page as a plain text file.
%I A205601 #42 Jan 04 2016 01:55:48
%S A205601 0,1,3,5,4,5,10,5,10,16,12,17,18,16,19,27,23,22,34,27,34,39,39,45,51,
%T A205601 41,50,51,44,57,68,71,63,74,63,76,87,84,89,104,94,108,111,99,117,116,
%U A205601 120,104,126,114,133,146,149,146,166,148,190,178,182,170,179,173
%N A205601 Goldbach's problem extended to division: number of decompositions of 2n into the floor of unordered ratios of two primes, floor(q/p) = 2n, where p < 2n < q.
%H A205601 Charles R Greathouse IV, <a href="/A205601/b205601.txt">Table of n, a(n) for n = 1..10000</a>
%e A205601 For n = 3, a(n) = 3 because 6 is the floor of 13/2, 19/3, and 31/5. - _T. D. Noe_, Jan 31 2012
%t A205601 Table[Length[Flatten[Table[Select[2*n*p + Range[p - 1], PrimeQ], {p, Prime[Range[PrimePi[2*n - 1]]]}]]], {n, 62}] (* _T. D. Noe_, Jan 31 2012 *)
%o A205601 (C++) #include <iostream>
%o A205601 using namespace std;
%o A205601 int main() //C++ code for the first 20 even integers >= 2
%o A205601            //where floor(q/p) = 2n, p<2n<q, by _James D. Klein_
%o A205601 { bool a[2000];  //Initialize array p with primes
%o A205601   int p[304];
%o A205601   int n=2000, i=0;
%o A205601   a[0] = a[1] = false;
%o A205601   for(int j=2; j<n; j++) a[j] = true;
%o A205601   for(int j=2; j<=n/2; j++)
%o A205601     for(int k=2; k<=n/j; k++)
%o A205601       a[j*k] = false;
%o A205601   for(int j=2; j<n; j++)
%o A205601     if(a[j]) p[i++]=j;
%o A205601   int count, istart = 0; //Generate the decompositions
%o A205601   for(int n=1; n<=20; n++)
%o A205601   { while(2*n>p[istart]) istart++;
%o A205601     count = 0;
%o A205601     for(int j=0; p[j]<2*n; j++)
%o A205601       for(int i=istart; p[i]<(p[j]+1)*2*n; i++)
%o A205601         if(p[i]/p[j]==2*n)count++;
%o A205601       cout << n << ". " << count << endl;
%o A205601   }
%o A205601 return 0;
%o A205601 }
%o A205601 (PARI) a(n)=n*=2;my(s,t);forprime(p=2,n-1,t=n*p;while(n==(t=nextprime(t+1))\p,s++));s \\ _Charles R Greathouse IV_, Jan 30 2012
%Y A205601 Cf. A002375, A202472.
%K A205601 nonn
%O A205601 1,3
%A A205601 _James D. Klein_, Jan 29 2012
%E A205601 a(21)-a(62) from _Charles R Greathouse IV_, Jan 31 2012