A376651
Points of upward concavity in the sequence of composite numbers (A002808).
Original entry on oeis.org
4, 8, 12, 17, 23, 26, 30, 35, 40, 46, 49, 55, 58, 63, 70, 73, 77, 81, 94, 97, 102, 112, 118, 123, 126, 131, 136, 146, 150, 162, 173, 176, 180, 185, 195, 200, 205, 210, 216, 219, 229, 242, 245, 249, 262, 267, 276, 280, 285, 292, 297, 302, 305, 310, 317, 320
Offset: 1
The composite numbers are (A002808):
4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, ...
with first differences (A073783):
2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, ...
with first differences (A073445):
0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, -1, 0, ...
with positive terms at (A376651):
4, 8, 12, 17, 23, 26, 30, 35, 40, 46, 49, 55, 58, 63, 70, 73, 77, 81, 94, 97, ...
Partitions into composite numbers are counted by
A023895, factorizations
A050370.
These are the positions of positive terms in
A073445, negative
A376652.
For zero second differences (instead of positive) we have
A376602.
A376652
Points of downward concavity in the sequence of composite numbers (A002808).
Original entry on oeis.org
2, 6, 10, 13, 19, 24, 28, 31, 36, 42, 47, 51, 56, 59, 64, 71, 75, 79, 82, 95, 98, 104, 114, 119, 124, 127, 132, 138, 148, 152, 163, 174, 178, 181, 187, 196, 201, 206, 212, 217, 221, 230, 243, 247, 250, 263, 268, 278, 281, 286, 293, 298, 303, 306, 311, 318, 321
Offset: 1
The composite numbers are (A002808):
4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, ...
with first differences (A073783):
2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, ...
with second differences (A073445):
0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, -1, 0, ...
with negative terms at (A376651):
2, 6, 10, 13, 19, 24, 28, 31, 36, 42, 47, 51, 56, 59, 64, 71, 75, 79, 82, 95, 98, ...
Partitions into composite numbers are counted by
A023895, factorizations
A050370.
These are the positions of negative terms in
A073445, positive
A376651.
For zero second differences instead of negative we have
A376602.
-
Comps:= remove(isprime, [seq(i,i=4..1000)]):
D1:= Comps[2..-1]-Comps[1..-2]:
D2:= D1[2..-1]-D1[1..-2]:
select(t -> D2[t] < 0, [$1..nops(D2)]); # Robert Israel, Nov 06 2024
-
Join@@Position[Sign[Differences[Select[Range[1000],CompositeQ],2]],-1]
A373820
Run-lengths (differing by 0) of antirun-lengths (differing by > 2) of odd primes.
Original entry on oeis.org
2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1
Offset: 1
The antiruns of odd primes (differing by > 2) begin:
3
5
7 11
13 17
19 23 29
31 37 41
43 47 53 59
61 67 71
73 79 83 89 97 101
103 107
109 113 127 131 137
139 149
151 157 163 167 173 179
181 191
193 197
199 211 223 227
229 233 239
241 251 257 263 269
271 277 281
with lengths:
1, 1, 2, 2, 3, 3, 4, 3, 6, 2, 5, 2, 6, 2, 2, ...
with runs:
1 1
2 2
3 3
4
3
6
2
5
2
6
2 2
4
3
5
3
4
with lengths a(n).
A001223 gives differences of consecutive primes, run-lengths
A333254, run-lengths of run-lengths
A373821.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
A376680
Run-lengths of first differences of composite numbers.
Original entry on oeis.org
2, 2, 2, 2, 2, 2, 1, 4, 2, 4, 1, 2, 2, 2, 1, 4, 1, 4, 2, 4, 1, 2, 2, 4, 1, 2, 1, 4, 1, 6, 1, 2, 2, 2, 2, 2, 1, 12, 1, 2, 1, 4, 2, 8, 2, 4, 1, 4, 1, 2, 1, 4, 1, 4, 2, 8, 2, 2, 2, 10, 1, 10, 1, 2, 2, 2, 1, 4, 2, 8, 1, 4, 1, 4, 1, 4, 2, 4, 1, 2, 2, 8, 1, 12, 1, 2
Offset: 1
The composite numbers (A002808) are:
4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, ...
with first differences (A073783):
2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, ...
with runs:
(2,2), (1,1), (2,2), (1,1), (2,2), (1,1), (2), (1,1,1,1), (2,2), (1,1,1,1), ...
with lengths (A376680):
2, 2, 2, 2, 2, 2, 1, 4, 2, 4, 1, 2, 2, 2, 1, 4, 1, 4, 2, 4, 1, 2, 2, 4, 1, 2, ...
For prime instead of composite we have
A333254, first appearances
A335406.
These are the first differences of
A376603.
A064113 lists positions of adjacent equal prime gaps.
A373822
Sum of the n-th maximal run of first differences of odd primes.
Original entry on oeis.org
4, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 12, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 12, 4, 12, 2, 10, 2, 4, 2, 24, 4, 2, 4, 6, 2, 10, 18, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 12, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4
Offset: 1
The odd primes are
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, ...
with first differences
2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, ...
with runs
(2,2), (4), (2), (4), (2), (4), (6), (2), (6), (4), (2), (4), (6,6), ...
with sums a(n).
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
A071148 gives partial sums of odd primes.
A373820 gives run-lengths of antirun-lengths of odd primes.
A375929
Numbers k such that A002808(k+1) = A002808(k) + 1. In other words, the k-th composite number is 1 less than the next.
Original entry on oeis.org
3, 4, 7, 8, 11, 12, 14, 15, 16, 17, 20, 21, 22, 23, 25, 26, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 43, 44, 45, 46, 48, 49, 52, 53, 54, 55, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 72, 73, 76, 77, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94
Offset: 1
The composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, ... which increase by 1 after positions 3, 4, 7, 8, ...
First differences are
A373403 (except first).
The version for non-perfect-powers is
A375740.
The version for nonprime numbers is
A375926.
A046933 counts composite numbers between primes.
-
Join@@Position[Differences[Select[Range[100],CompositeQ]],1]
-
from sympy import primepi
def A375929(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+bisection(lambda y:primepi(x+2+y))-2
return bisection(f,n,n) # Chai Wah Wu, Sep 15 2024
-
# faster for initial segment of sequence
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
pic, prevc = 0, -1
for i in count(4):
if not isprime(i):
if i == prevc + 1:
yield pic
pic, prevc = pic+1, i
print(list(islice(agen(), 10000))) # Michael S. Branicky, Sep 17 2024
A376653
Sorted positions of first appearances in the second differences of consecutive prime-powers inclusive (A000961).
Original entry on oeis.org
1, 4, 5, 10, 12, 18, 25, 45, 47, 48, 60, 68, 69, 71, 80, 118, 121, 178, 179, 199, 206, 207, 216, 244, 245, 304, 325, 327, 402, 466, 484, 605, 801, 880, 939, 1033, 1055, 1077, 1234, 1281, 1721, 1890, 1891, 1906, 1940, 1960, 1962, 2257, 2290, 2410, 2880, 3150
Offset: 1
The prime-powers inclusive (A000961) are:
1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, ...
with first differences (A057820):
1, 1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, 3, ...
with first differences (A376596):
0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, ...
with first appearances (A376653):
1, 4, 5, 10, 12, 18, 25, 45, 47, 48, 60, 68, 69, 71, 80, 118, 121, 178, 179, 199, ...
For first differences we had
A057820, sorted firsts
A376340(n)+1 (except first term).
These are the sorted positions of first appearances in
A376596.
The exclusive version is a(n) - 1 =
A376654(n), except first term.
For squarefree instead of prime-power we have
A376655.
A064113 lists positions of adjacent equal prime gaps.
For prime-powers inclusive:
A057820 (first differences),
A376597 (inflections and undulations),
A376598 (nonzero curvature).
-
q=Differences[Select[Range[100],#==1||PrimePowerQ[#]&],2];
Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&]
A373402
Numbers k such that the k-th maximal antirun of prime numbers > 3 has length different from all prior maximal antiruns. Sorted list of positions of first appearances in A027833.
Original entry on oeis.org
1, 2, 4, 6, 8, 10, 21, 24, 30, 35, 40, 41, 46, 50, 69, 82, 131, 140, 185, 192, 199, 210, 248, 251, 271, 277, 325, 406, 423, 458, 645, 748, 811, 815, 826, 831, 987, 1053, 1109, 1426, 1456, 1590, 1629, 1870, 1967, 2060, 2371, 2607, 2920, 2946, 3564, 3681, 4119
Offset: 1
The maximal antiruns of prime numbers > 3 begin:
5
7 11
13 17
19 23 29
31 37 41
43 47 53 59
61 67 71
73 79 83 89 97 101
103 107
109 113 127 131 137
139 149
151 157 163 167 173 179
The a(n)-th rows begin:
5
7 11
19 23 29
43 47 53 59
73 79 83 89 97 101
109 113 127 131 137
For squarefree runs we have the triple (1,3,5), firsts of
A120992.
For prime runs we have the triple (1,2,3), firsts of
A175632.
For nonsquarefree runs we have
A373199 (assuming sorted), firsts of
A053797.
For composite antiruns we have the triple (1,2,7), firsts of
A373403.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.
Cf.
A006512,
A007674,
A049093,
A068781,
A072284,
A077641,
A174965,
A251092,
A373198,
A373408,
A373411.
-
t=Length/@Split[Select[Range[4,10000],PrimeQ],#1+2!=#2&]//Most;
Select[Range[Length[t]],FreeQ[Take[t,#-1],t[[#]]]&]
A375926
Numbers k such that A018252(k+1) = A018252(k) + 1. In other words, the k-th nonprime number is 1 less than the next.
Original entry on oeis.org
4, 5, 8, 9, 12, 13, 15, 16, 17, 18, 21, 22, 23, 24, 26, 27, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 44, 45, 46, 47, 49, 50, 53, 54, 55, 56, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 73, 74, 77, 78, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
Offset: 1
The nonprime numbers are 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, ... which increase by 1 after term 4, term 5, term 8, etc.
The complement appears to be
A014689, except the first term.
First differences are
A373403 (except first).
The version for non-perfect-powers is
A375740.
The version for composite numbers is
A375929.
A046933 counts composite numbers between primes.
-
Join@@Position[Differences[Select[Range[100],!PrimeQ[#]&]],1]
-
from sympy import primepi
def A375926(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+bisection(lambda y:primepi(x+1+y))-1
return bisection(f,n,n) # Chai Wah Wu, Sep 15 2024
A376560
Points of upward concavity in the sequence of perfect-powers (A001597). Positives of A376559.
Original entry on oeis.org
1, 3, 4, 6, 8, 9, 10, 11, 12, 15, 16, 17, 20, 22, 23, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 46, 47, 48, 49, 50, 53, 54, 55, 57, 58, 60, 61, 62, 63, 64, 65, 67, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91
Offset: 1
The perfect powers (A001597) are:
1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, ...
with first differences (A053289):
3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, 33, ...
with first differences (A376559):
1, -3, 6, 2, -7, 3, -1, 9, 2, 2, 2, 2, -17, -1, 13, 9, 2, -7, -11, 9, -5, 20, 2, ...
with positive positions (A376560):
1, 3, 4, 6, 8, 9, 10, 11, 12, 15, 16, 17, 20, 22, 23, 26, 27, 28, 31, 32, 33, 34, ...
For primes instead of perfect-powers we have
A258025.
These are positions of positive terms in
A376559.
For downward concavity we have
A376561 (probably the complement).
A064113 lists positions of adjacent equal prime gaps.
A333254 gives run-lengths of differences between consecutive primes.
Cf.
A006549,
A025475,
A030173,
A045542,
A052410,
A053707,
A054819,
A069623,
A174965,
A216765,
A251092,
A376308.
-
N:= 10^6: # to use perfect powers <= N
S:= {1,seq(seq(i^j,j=2..floor(log[i](N))),i=2..isqrt(N))}:
L:= sort(convert(S,list)):
DL:= L[2..-1]-L[1..-2]:
D2L:= DL[2..-1]-DL[1..-2]:
select(i -> D2L[i]>0, [$1..nops(D2L)]); # Robert Israel, Dec 01 2024
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Join@@Position[Sign[Differences[Select[Range[1000],perpowQ],2]],1]
Comments