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.
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
Keywords
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
Comments