OFFSET
1,1
COMMENTS
prime(a(n)+1) - prime(a(n)) = n*2. E.g., for n=4: prime(a(4)+1) - prime(a(4)) = 4*2, prime(1062) - prime(1061) = 4*2, 8521 - 8513 = 8.
LINKS
Simon Strandgaard, Visualization of the first 5 terms.
EXAMPLE
For n=1, consider k's with prime gap 1*2 = 2, i.e., k's such that A001223(k)=2. k=5 is the first place where A001223(k)=2 and A141042(k)=A340649(k), so a(1)=5.
PROG
(Ruby) n = 1
last_prime = 2
find_gap = 2
result = []
Prime.each(10_000) do |prime|
next if prime == 2
gap = prime - last_prime
if gap == find_gap
value = (n * prime) % last_prime
if value == n * gap
result << n
find_gap += 2
end
end
n += 1
last_prime = prime
end
p result
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Simon Strandgaard and Jamie Morken, Apr 17 2021
STATUS
approved