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-4 of 4 results.

A158924 Number of prime powers - 1 in interval (A158923(n-1), A158923(n)] expressing the excess or deficit relative to the asymptotic average of 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, -1, 1, 0, 1, 0, 0, 0, 0, 1, 0, -1, 1, 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, 1, 0, -1, 0, 2, 0, 1, -1, 0, 0, 0, 0, 1, 0, 0, 0, -1, 1, 1, -1, -1, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, 0, 1, 0, 1, 0, 0, -1, 0, 1, 0, -1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, -1, 1, 0, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Daniel Forgues, Mar 31 2009

Keywords

Comments

The first interval is assumed to be (1, A158923(1)].

Crossrefs

Cf. A158923: a(1) = 2, a(n) = a(n-1) + round(log(a(n-1))), n >= 2, for which each (a(n-1), a(n)] interval asymptotically contains one prime power on average.
Cf. A158925: Accumulated excess or deficit of prime powers in (1, A158924(n)] (Partial sums of A158924).
Cf. A000961 Prime powers p^k (p prime, k >= 0).
Cf. A025528 Number of prime powers <= n with exponents >0.

Extensions

Corrected and edited by Daniel Forgues, Apr 21 2009

A338396 The prime numbers in A158923.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 19, 31, 109, 139, 149, 179, 199, 229, 239, 683, 739, 809, 823, 907, 977, 991, 1019, 1033, 1061, 1103, 1117, 1187, 1201, 1229, 1327, 1439, 1453, 1481, 1523, 1579, 1607, 1621, 1663, 1733, 1747, 1789, 4931, 4967, 5003, 5021, 5039, 5147, 5237
Offset: 1

Views

Author

Ya-Ping Lu, Oct 23 2020

Keywords

Comments

This sequence is consists of the prime numbers in A158923, in which A158923(m) is the sum of the previous term A158923(m-1) and the average prime gap log(A158923(m-1)) rounded to the nearest integer with A158923(1) = 2.

Crossrefs

Programs

  • Python
    from sympy import isprime
    from math import log
    print(2)
    a_last = p_last = m = 2
    n = 1
    while m >= 2:
        a = a_last + int(log(a_last) + 0.5)
        if isprime(a) == 1:
            print(a)
            n += 1
        a_last = a
        m += 1

A158925 Accumulated excess or deficit of prime powers in (1, A158924(n)].

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 2, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 4, 5, 4, 5, 5, 5, 4, 4, 5, 6, 6, 5, 5, 7, 7, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 7, 8, 9, 8, 7, 7, 6, 6, 7, 7, 7, 8, 7, 7, 8, 8, 9, 9, 10, 10, 10, 9, 9, 10, 10, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 10, 11, 11, 11
Offset: 1

Views

Author

Daniel Forgues, Mar 31 2009

Keywords

Comments

Partial sums of A158924.
First term < 0: a(9503) = -1. - Sidney Cadot, Sep 23 2015

Crossrefs

Cf. A158924, "Number of prime powers - 1 in interval (A158923(n-1), A158923(n)] expressing the excess or deficit relative to the asymptotic average of 1."

Extensions

Corrected and edited by Daniel Forgues, Apr 22 2009

A338404 Primes p in A158932 such that p = prime(k) = A158932(k) for some k.

Original entry on oeis.org

2, 3, 397217, 412193, 418927, 421163, 421501, 423763, 426077, 431797, 454859, 456367, 456523, 458993, 475529, 480989, 482393, 484733, 501451, 1003133, 1003469, 1003763, 1003819, 1003931, 1007599, 1007711, 1392851, 1393103, 1393159, 1393187, 1393229, 1393313
Offset: 1

Views

Author

Ya-Ping Lu, Oct 24 2020

Keywords

Comments

Sequence A158923, in which every term is the sum of the previous term and the average prime gap, is a "simulation" of the prime number sequence A000040. This sequence lists the terms in A158923 that match those in A000040 both in value and in position, or A158923(m) = A000040(m).
There are 68 matches found for m up to 1073741824 (prime(1073741824)=24563311309), with a(68) = 12496469849.

Crossrefs

Programs

  • PARI
    lista(nn) = {my(a = 2); for (n=1, nn, if (a == prime(n), print1(a, ", ")); a += round(log(a)););} \\ Michel Marcus, Oct 31 2020
  • Python
    from sympy import nextprime
    from math import log
    print(2)
    a_last = b_last = m = 2
    n = 1
    while m >= 2:
        a = a_last + int(log(a_last) + 0.5)
        b = nextprime(b_last)
        if a == b:
            n += 1
            print (m)
        a_last = a
        b_last = b
        m += 1
    

Formula

a(n) = A158923(m), where m is the n-th index in A158923 such that A158923(m) = A000040(m).
Showing 1-4 of 4 results.