login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 0
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Positions of 1's in A073783 (see also A054546, A065310).
LINKS
FORMULA
a(n) = A375926(n) - 1.
EXAMPLE
The composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, ... which increase by 1 after positions 3, 4, 7, 8, ...
MATHEMATICA
Join@@Position[Differences[Select[Range[100], CompositeQ]], 1]
PROG
(Python)
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
CROSSREFS
Positions in A002808 of each element of A068780.
The complement is A065890 shifted.
First differences are A373403 (except first).
The version for non-prime-powers is A375713, differences A373672.
The version for prime-powers is A375734, differences A373671.
The version for non-perfect-powers is A375740.
The version for nonprime numbers is A375926.
A000040 lists the prime numbers, differences A001223.
A000961 lists prime-powers (inclusive), differences A057820.
A002808 lists the composite numbers, differences A073783.
A018252 lists the nonprime numbers, differences A065310.
A046933 counts composite numbers between primes.
Sequence in context: A213373 A363353 A332059 * A229081 A070874 A187582
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Sep 12 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 17 04:18 EDT 2024. Contains 375984 sequences. (Running on oeis4.)