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.

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.

This page as a plain text file.
%I A359354 #20 Feb 10 2023 20:14:46
%S A359354 2,2,3,238,28495,576169,24635028
%N 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.
%C A359354 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.
%e A359354 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.
%e A359354 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.
%t A359354 g[m_] := (Prime[m + 2] - Prime[m + 1])/(Prime[m + 1] - Prime[m]);
%t A359354 gs[n_] := g[Range[n]];
%t A359354 nmax = 2^26; (* maximum explorative range to obtain the first elements *)
%t A359354 seqtot = gs[nmax];
%t A359354 maxn = 5; (* Number of elements to look for after first two elements {2,2} *)
%t A359354 {2,2}~Join~Table[SequencePosition[seqtot, gs[j]][[2]][[1]], {j, 1, maxn}]
%Y A359354 Cf. A001223, A272863, A274225, A274263.
%K A359354 nonn,hard,more
%O A359354 1,1
%A A359354 _Andres Cicuttin_, Dec 27 2022