login
A359354
Position of the first subsequence of n primes that differs from the first n primes, but where the relative distances among their elements coincide with those of the subsequence of first n primes except for a scale factor.
0
2, 2, 3, 238, 28495, 576169, 24635028
OFFSET
1,1
COMMENTS
The first subsequence composed of one prime is {2}, whose unique element has zero distance with itself, and the same happens with the first subsequence of one element {3} that differs from {2}. As these distances are equal to zero they coincide, so a(1) = 2 because subsequence {3} is at position 2 in the sequence of primes.
EXAMPLE
The first subsequence composed of two primes is {2,3}; the distance between its elements is 1. The subsequence of two primes {3,5} is the first subsequence that differs from {2,3}, and the distance between its elements is 2, a distance that coincides with 1 with a scale factor of 1/2, so a(2) = 2 because the first prime in the subsequence {3,5} is the 2nd prime.
The first subsequence composed of three primes is {2,3,5}; the distances between its consecutive elements are (1,2). The first subsequence of three primes {5,7,11} differs from {2,3,5} and the distances between its consecutive elements are (2,4), and these distances coincide with (1,2) with a scale factor of 1/2, so a(3) = 3 because the first prime in the subsequence {5,7,11} is the 3rd prime.
MATHEMATICA
g[m_] := (Prime[m + 2] - Prime[m + 1])/(Prime[m + 1] - Prime[m]);
gs[n_] := g[Range[n]];
nmax = 2^26; (* maximum explorative range to obtain the first elements *)
seqtot = gs[nmax];
maxn = 5; (* Number of elements to look for after first two elements {2, 2} *)
{2, 2}~Join~Table[SequencePosition[seqtot, gs[j]][[2]][[1]], {j, 1, maxn}]
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Andres Cicuttin, Dec 27 2022
STATUS
approved