cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A374481 The distance from prime(n) to the nearest common ancestor of prime(n) and 1+prime(n) in the Doudna-tree (A005940).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 09 2024

Keywords

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.

Crossrefs

Programs

  • 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))));

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