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.

A101593 a(n) is the number of m <= 2^n which are in A075190, i.e., such that m^2 is exactly at the center between two consecutive primes, or in other words A056929(m) = 0.

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 19, 34, 62, 109, 202, 336, 587, 1100, 2003, 3630, 6784, 12607, 23647, 44206, 83510, 157851, 299810, 571264, 1090986, 2088445, 4004347, 7687694, 14788984, 28496850, 54955214, 106159961
Offset: 1

Views

Author

Zak Seidov and M. F. Hasler, Dec 27 2007

Keywords

Comments

A056929(m) = 0 iff m^2 is an interprime <=> m^2 = (A007491(m^2) + A053001(m^2))/2 = average of the next higher and next lower primes.
From M. F. Hasler, Oct 18 2022: (Start)
The ratio a(n+1)/a(n) oscillates between 1.5 and 2 for the first few values, but then seems to converge to a limit between 1.9 and 2; from n = 19 on these ratios appear to be strictly increasing (from 1.87 at n = 19 to 1.92 at n = 27).
At first sight it seems natural that there are twice as many interprimes of the form f(m) when the upper limit on m is increased by a factor of 2, but this might depend on the function f.
If instead of m^2 we consider the same for m^3, then we find the sequence 0, 1, 1, 3, 5, 8, 18, 29, 52, 86, 136, 223, 421, 758, 1376, 2517, 4616, 8714, 16173, 30414, 57583, 109539, ... which follows roughly the same asymptotic behavior. (End)

Crossrefs

Programs

  • PARI
    a(n)=sum(i=2,2^n,!A056929(i))
    
  • PARI
    a(n)=sum(i=2,2^n,nextprime(i^2)+precprime(i^2)==2*i^2)
    
  • PARI
    t=0;vector(15,n,t+=sum(i=1/2<M. F. Hasler, Oct 18 2022] */
    for(n=16, 30, print1("/* a("n") = */ ", t += sum(i=2^(n-1)+1,2^n, nextprime(i^2)+precprime(i^2)==2*i^2),", "))

Formula

a(1) counts the squares m^2 with m <= 2^n = 2 which are interprimes. The squares 0^2 = 0 and 1^2 = 1 obviously aren't interprimes, so the only such square in that range is m^2 = 2^2 = 4 = (nextprime + precprime)/2 = (3 + 5)/2, so a(1) = 1.
Then for n = 2, up to m <= 2^n = 4 we have the additional squares m^2 = 3^2 = 9 = (7 + 11)/2 (an interprime) and m^2 = 4^2 = 16 <> (13 + 17)/2 = 15, so this m^2 is not an interprime, and a(2) = a(1) + 1 = 2.

Extensions

a(23)-a(25) from Kevin P. Thompson, Nov 26 2021
a(26)-a(28) from M. F. Hasler, Oct 18 2022
a(29)-a(32) from Bill McEachen, Dec 14 2022