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

A298009 a(n) = f(n-1,n)+(n-1)*k, n>=1, where the function f(a,b) gives the number of prime numbers in the range [a*k,b*k[ with k=10^p. For this sequence we use p=2.

Original entry on oeis.org

25, 121, 216, 316, 417, 514, 616, 714, 815, 914, 1016, 1112, 1215, 1311, 1417, 1512, 1615, 1712, 1812, 1913, 2014, 2110, 2215, 2315, 2410, 2511, 2615, 2714, 2812, 2911, 3012, 3110, 3211, 3315, 3411, 3514, 3613, 3712, 3811, 3911, 4015, 4109, 4216, 4309, 4411, 4512, 4612, 4712, 4808, 4915
Offset: 1

Views

Author

Luis F.B.A. Alexandre, Jan 10 2018

Keywords

Comments

Realization of the general term presented in the sequence A298008, for the case of p=2. See detailed comments there.

Crossrefs

Cf. A298008.

Programs

  • Mathematica
    Block[{p = 2, k}, k = 10^p; Array[Apply[Subtract, PrimePi[{k #, k (# - 1)}]] + (# - 1) k &, 50]] (* Michael De Vlieger, Jan 11 2018 *)
  • Python
    # Generates all elements of the sequence smaller than last
    last = 1000
    p=[2]
    c=1
    for i in range(3,last+2,2):
        prime = True
        for j in p:
            if i%j == 0:
                prime=False;
                break
        if prime:
            p.append(i)
            c = c + 1
        ii = (i//100)*100
        if i-ii == 1:
            if prime:
                print(ii-100+c-1, end=',')
                c = 1
            else:
                print(ii-100+c, end=',')
                c = 0

Formula

a(n) = A038822(n-1) + 100*(n-1); - Michel Marcus, Jan 11 2018
Showing 1-1 of 1 results.