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.

A360418 Numbers k such that, in a listing of all congruence classes of positive integers, the k-th congruence class contains k. Here the class r mod m (with r in {1,...,m}) precedes the class a' mod b' (with r' in {1,...,m'}) iff m < m' or r > r'.

This page as a plain text file.
%I A360418 #25 Feb 10 2025 16:14:19
%S A360418 1,2,3,5,13,17,20,25,41,48,53,61,85,95,102,113,145,158,167,181,221,
%T A360418 237,248,265,313,332,345,365,421,443,458,481,545,570,587,613,685,713,
%U A360418 732,761,841,872,893,925,1013,1047,1070,1105,1201,1238,1263,1301,1405,1445,1472,1513,1625,1668,1697,1741,1861
%N A360418 Numbers k such that, in a listing of all congruence classes of positive integers, the k-th congruence class contains k. Here the class r mod m (with r in {1,...,m}) precedes the class a' mod b' (with r' in {1,...,m'}) iff m < m' or r > r'.
%C A360418 The sequence appears to be the interleaving of the four sequences A080856, A102083, A360416, A360417. This has been verified for values of k up to one million as of February 06 2023.
%C A360418 Above conjecture confirmed with more terms and linear recurrence.  See supporting formula below. - _Ray Chandler_, Feb 10 2025
%H A360418 Ray Chandler, <a href="/A360418/b360418.txt">Table of n, a(n) for n = 1..14142</a> (terms up to 10^8)
%H A360418 <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1, 0, 0, 2, -2, 0, 0, -1, 1).
%F A360418 From _Ray Chandler_, Feb 10 2025: (Start)
%F A360418 a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9) for n > 8.
%F A360418 A080856(n) = A360417(n-1) + 2*A080856(n-1) - 2*A360417(n-2) - A080856(n-2) + A360417(n-3).
%F A360418 A102083(n) = A080856(n) + 2*A102083(n-1) - 2*A080856(n-1) - A102083(n-2) + A080856(n-2).
%F A360418 A360416(n) = A102083(n) + 2*A360416(n-1) - 2*A102083(n-1) - A360416(n-2) + A102083(n-2).
%F A360418 A360417(n) = A360416(n) + 2*A360417(n-1) - 2*A360416(n-1) - A360417(n-2) + A360416(n-2). (End)
%e A360418 The 1st congruence class in the list (with m=1 and r=1) is {1,2,3,...} which contains 1, so 1 is in the sequence. The 2nd congruence class (with m=2 and r=2) is {2,4,6,...} which contains 2, so 2 is in the sequence. The 3rd congruence class (with m=2 and r=1) is {1,3,5,...} which contains 3, so 3 is in the sequence. The 4th congruence class (with m=3 and r=3) is {3,6,9,...} which does not contain 4, so 4 is not in the sequence.
%t A360418 mval[n_] := Floor[Sqrt[2 n] + 1/2]; (* A002024 *)
%t A360418 rval[n_] := (2 - 2 n + Round[Sqrt[2 n]] + Round[Sqrt[2 n]]^2)/2; (* A004736 *)
%t A360418 test[n_] := Mod[n - rval[n], mval[n]] == 0;
%t A360418 Select[Range[10000], test[#] &]
%Y A360418 Cf. A002024, A004736, A007607, A080856, A102083, A360416, A360417.
%K A360418 nonn,easy
%O A360418 1,2
%A A360418 _James Propp_, Feb 06 2023