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.
2, 2, 3, 238, 28495, 576169, 24635028
Offset: 1
Examples
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.
Programs
-
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}]
Comments