login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A374481
The distance from prime(n) to the nearest common ancestor of prime(n) and 1+prime(n) in the Doudna-tree (A005940).
4
0, 1, 1, 3, 3, 2, 6, 5, 7, 8, 10, 4, 10, 9, 13, 15, 15, 7, 12, 19, 9, 19, 20, 22, 24, 20, 21, 27, 26, 23, 30, 28, 25, 32, 34, 28, 15, 25, 36, 31, 39, 39, 41, 19, 41, 45, 31, 44, 42, 43, 46, 50, 52, 51, 42, 52, 55, 51, 25, 46, 41, 61, 61, 59, 28, 51, 44, 67, 60, 68, 55, 70, 64, 71, 69, 74, 73, 32, 61, 69, 79, 35, 82
OFFSET
1,4
COMMENTS
Question: Is there any reasonable lower bound for this sequence?
Considering k that do not occur as terms of this sequence, see also A374214.
FORMULA
a(n) = A347381(A000040(n)) = n - A348040(A000040(n), 1+A000040(n)).
For all n >= 1, a(A059305(n)) = A059305(n)-1.
If A319988(1+A000040(n)) then a(n) = n-1.
For n > 1, a(n) = n - A241917(1+prime(n)) - 1. - Peter Munn and Antti Karttunen, Jul 10 2024
PROG
(PARI) A374481(n) = A347381(prime(n));
(PARI)
A241917(n) = if(isprime(n), primepi(n), if(1>=omega(n), 0, my(f=factor(n)); if(f[#f~, 2]>1, 0, primepi(f[#f~, 1])-primepi(f[(#f~)-1, 1]))));
A374481(n) = if(1==n, 0, (-1+n-A241917(1+prime(n))));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 09 2024
STATUS
approved