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.

A272862 Positive integers j such that prime(i) + prime(j) = i*j for some i <= j.

This page as a plain text file.
%I A272862 #28 Aug 11 2016 05:46:55
%S A272862 4,6,8,24,29,30,164,165,166,1051,2624,2638,2650,2670,2674,2676,40027,
%T A272862 40028,40112,251701,251703,251706,251751,637144,637202,637216,637220,
%U A272862 1617162,1617165,4124694,10553383,10553408,10553464,10553533,10553535,10553839,69709686
%N A272862 Positive integers j such that prime(i) + prime(j) = i*j for some i <= j.
%C A272862 Also pi(q) for primes q verifying p+q = pi(p)*pi(q) for some prime p <= q.
%C A272862 The list of products i*j gives A272860. See also comments there.
%H A272862 Giuseppe Coppoletta, <a href="/A272862/b272862.txt">Table of n, a(n) for n = 1..43</a>
%e A272862 8 is a term as prime(3) + prime(8) = 3*8.
%t A272862 Select[Range[3000], Function[j, Total@ Boole@ Map[Prime@ # + Prime@ j == # j &, Range@ j] > 0]] (* _Michael De Vlieger_, Jul 28 2016 *)
%o A272862 (Sage) def sol(n):
%o A272862     if n<5: a=n
%o A272862     else: a=exp(n+1)/(n+1)
%o A272862     b=(n-1)/n^2*exp(n^2/(n-1.1))
%o A272862     return [j for j in range(a,b) if is_prime(n*j-nth_prime(n)) and prime_pi(n*j-nth_prime(n))==j]
%o A272862 flatten([sol(i) for i in (1..15) if len(sol(i))>0]) #
%o A272862 (PARI) is(n) = for(i=1, n, if(prime(i)+prime(n)==i*n, return(1))); return(0) \\ _Felix Fröhlich_, Jul 27 2016
%o A272862 (PARI) is(n,p=prime(n))=my(i); forprime(q=2,p, if(i++*n==p+q, return(1))); 0
%o A272862 v=List(); n=0; forprime(p=2,1e6, if(is(n++,p), listput(v,n))); Vec(v) \\ _Charles R Greathouse IV_, Jul 28 2016
%Y A272862 Cf. A272860, A272861, A000720, A000040.
%K A272862 nonn
%O A272862 1,1
%A A272862 _Giuseppe Coppoletta_, Jul 25 2016