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.

Showing 1-6 of 6 results.

A036378 Number of primes p between powers of 2, 2^n < p <= 2^(n+1).

Original entry on oeis.org

1, 1, 2, 2, 5, 7, 13, 23, 43, 75, 137, 255, 464, 872, 1612, 3030, 5709, 10749, 20390, 38635, 73586, 140336, 268216, 513708, 985818, 1894120, 3645744, 7027290, 13561907, 26207278, 50697537, 98182656, 190335585, 369323305, 717267168, 1394192236, 2712103833
Offset: 0

Views

Author

Keywords

Comments

Number of primes whose binary order (A029837) is n+1, i.e., those with ceiling(log_2(p)) = n+1. [corrected by Jon E. Schoenfield, May 13 2018]
First differences of A007053. This sequence illustrates how far the Bertrand postulate is oversatisfied.
Scaled for Ramanujan primes as in A190501, A190502.
This sequence appears complete such that any nonnegative number can be written as a sum of distinct terms of this sequence. The sequence has been checked for completeness up to the gap between 2^46 and 2^47. Assuming that after 2^46 the formula x/log(x) is a good approximation to primepi(x), it can be proved that 2*a(n) > a(n+1) for all n >= 46, which is a sufficient condition for completeness. [Frank M Jackson, Feb 02 2012]

Examples

			The 7 primes for which A029837(p)=6 are 37, 41, 43, 47, 53, 59, 61.
		

Crossrefs

Programs

  • Magma
    [1,1] cat [#PrimesInInterval(2^n, 2^(n+1)): n in [2..29]]; // Vincenzo Librandi, Nov 18 2014
  • Mathematica
    t = Table[PrimePi[2^n], {n, 0, 20}]; Rest@t - Most@t (* Robert G. Wilson v, Mar 20 2006 *)
  • PARI
    a(n) = primepi(1<<(n+1))-primepi(1<
    				

Formula

a(n) = primepi(2^(n+1)) - primepi(2^n).
a(n) = A095005(n)+A095006(n) = A095007(n) + A095008(n) = A095013(n) + A095014(n) = A095015(n) + A095016(n) (for n > 1) = A095021(n) + A095022(n) + A095023(n) + A095024(n) = A095019(n) + A095054(n) = A095020(n) + A095055(n) = A095060(n) + A095061(n) = A095063(n) + A095064(n) = A095094(n) + A095095(n).

Extensions

More terms from Labos Elemer, May 13 2004
Entries checked by Robert G. Wilson v, Mar 20 2006

A095060 Number of fibeven primes (A095080) in range ]2^n,2^(n+1)].

Original entry on oeis.org

1, 2, 2, 3, 3, 9, 16, 25, 50, 83, 150, 286, 540, 975, 1865, 3515, 6588, 12620, 23835, 45486, 86811, 165822, 317770, 608517, 1170182, 2254124, 4342530, 8383468, 16197159, 31335332, 60680818, 117633364, 228260489, 443281943, 861677274
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Formula

a(n) = A036378(n) - A095061(n) = A095062(n) + A095067(n).

Extensions

a(34)-a(35) from Amiram Eldar, Jun 13 2024

A095066 Number of fib001 primes (A095086) in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 0, 0, 1, 3, 1, 6, 9, 15, 34, 63, 114, 206, 386, 725, 1366, 2601, 4803, 9144, 17331, 33106, 63067, 121112, 233785, 447721, 860033, 1659656, 3200843, 6188292, 11966122, 23175696, 44928209, 87187514, 169331564, 329134246
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Formula

a(n) = A095061(n) - A095069(n).

Extensions

a(34)-a(35) from Amiram Eldar, Jun 13 2024

A095081 Fibodd primes, i.e., primes p whose Zeckendorf-expansion A014417(p) ends with one.

Original entry on oeis.org

17, 19, 43, 53, 59, 61, 67, 101, 103, 127, 137, 163, 179, 197, 211, 229, 239, 263, 271, 281, 307, 313, 331, 347, 349, 373, 383, 389, 433, 449, 457, 467, 491, 499, 509, 569, 577, 593, 601, 619, 643, 653, 661, 677, 739, 773, 787, 797, 821, 823
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Intersection of A000040 and A003622. Union of A095086 and A095089. Cf. A095061, A095080.

Programs

  • Mathematica
    r = Map[Fibonacci, Range[2, 12]]; Select[Prime@ Range@ 144, Last@ Flatten@ Map[Position[r, #] &, Abs@ Differences@ NestWhileList[Function[k, k - SelectFirst[Reverse@ r, # < k &]], # + 1, # > 1 &]] == 1 &] (* Michael De Vlieger, Mar 27 2016, Version 10 *)
  • PARI
    genit(maxx)={for(n=1,maxx,q=(n-1)+(n+sqrtint(5*n^2))\2; if(isprime(q), print1(q,",")));} \\ Bill McEachen, Mar 26 2016
    
  • Python
    from sympy import fibonacci, primerange
    def a(n):
        k=0
        x=0
        while n>0:
            k=0
            while fibonacci(k)<=n: k+=1
            x+=10**(k - 3)
            n-=fibonacci(k - 1)
        return x
    def ok(n):
        return str(a(n))[-1]=="1"
    print([n for n in primerange(1, 1001) if ok(n)]) # Indranil Ghosh, Jun 07 2017

A095069 Number of fib101 primes (A095089) in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 1, 9, 10, 20, 42, 64, 126, 251, 440, 828, 1560, 2967, 5656, 10769, 20419, 39327, 74826, 143516, 276217, 531587, 1025104, 1977596, 3821827, 7396083, 14326142, 27774012, 53875302, 104653661, 203380716
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Formula

a(n) = A095061(n) - A095066(n).

Extensions

a(34)-a(35) from Amiram Eldar, Jun 13 2024

A095291 Number of upper Wythoff primes (A095281) in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 2, 1, 2, 2, 5, 9, 13, 35, 51, 93, 175, 331, 595, 1149, 2182, 4097, 7749, 14780, 28131, 53583, 102372, 196345, 375876, 722743, 1392156, 2684022, 5180823, 10008419, 19368226, 37499404, 72698062, 141064116
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Comments

As expected, the ratio of a(n)/A036378(n) seems to approach 1-((sqrt(5)-1)/2) (= 0.381966011250...): 0, 1, 0.5, 0.4, 0.285714, 0.384615, 0.391304, 0.302326, 0.466667, 0.372263, 0.364706, 0.377155, 0.379587, 0.369107, 0.379208, 0.382204, 0.381152, 0.380039, 0.382555, 0.382287, 0.381819, 0.381677, 0.382211, 0.381283, 0.381572, 0.381858, 0.381943, 0.382013, 0.381895, 0.382035, 0.381935, 0.381947, 0.381953
Also expected, the ratio a(n)/A095061(n) seems to approach 1: 1, 0, 0, 1, 0.5, 1.25, 1.28571, 0.72222, 1.4, 0.94444, 0.88571, 0.98315, 0.99699, 0.93407, 0.98627, 0.99453, 0.98462, 0.9973, 0.99865, 1.0011, 1.00108, 0.99979, 1.00208, 0.99622, 0.99835, 1.00039, 0.99973, 1.00046, 0.99983, 1.00031, 0.99994, 0.99994, 1.00001

Crossrefs

a(n) = A036378(n)-A095290(n). Cf. A095061, A095290.
Showing 1-6 of 6 results.