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.

A351498 Position k of first term in a run of odd terms with length > 1 in A093714.

This page as a plain text file.
%I A351498 #14 May 04 2022 12:23:41
%S A351498 1,10,17,78,1787,15022,38123,45052,1036043
%N A351498 Position k of first term in a run of odd terms with length > 1 in A093714.
%C A351498 Let S = A093714, known to be a permutation of the natural numbers.
%C A351498 S(k) and S(k+1) are odd.
%C A351498 Theorem: S(n) = n implies S(n) and n have the same parity. Proof: S(n) = n iff S(n) mod n = 0, since n | n. If prime q|n yet (S(n),q) = 1, then S(n) != n, a contradiction.
%C A351498 Corollary: Fixed points in S(n) appear iff S(n) and n have same parity.
%C A351498 Corollary: Consecutive odd terms S(k), S(k+1) imply that the smallest missing number u in S is either odd or (S(k),u) > 1.
%C A351498 Fixed points S(k) appear at k in intervals [78, 1787], [15022, 38123], [45052, 1036043]. These positions result from a dataset of S(1..2^30). Are there any more runs of odd terms?
%e A351498 S(1) = 1 and S(2) = 3, therefore this sequence begins with 1.
%e A351498 S(10) = 13 and S(11) = 9, therefore 10 is in this sequence.
%e A351498 S(17) = 23 and S(18) = 15, therefore 17 is in this sequence.
%e A351498 For 2 <= k <= 10, S(k) and k have different parity, but for 11 <= k <= 17, S(k) and k have the same parity.
%t A351498 nn = 2^20, c = {1}, j = 1, s = 0; t = {}; u = 2; Reap[Do[k = u; While[Nand[FreeQ[c, k], CoprimeQ[j, k], k != j + 1], k++]; j = k; AppendTo[c, k]; If[# != s, s = #; Sow[i - 1]] &@ Mod[Abs[k - i], 2]; If[k == u, While[MemberQ[c, u], u++]; c = DeleteCases[c, _?(# < u &)]], {i, 2, nn}] ][[-1, -1]]
%Y A351498 Cf. A093714, A351499, A352928, A352932.
%K A351498 nonn,more
%O A351498 1,2
%A A351498 _Michael De Vlieger_, May 03 2022