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.

A370952 a(1) = 1; for n > 1, a(n) is the least positive integer not already in the sequence such that a(n) == a(n-1) (mod 2*n-1).

This page as a plain text file.
%I A370952 #25 Jul 09 2025 05:03:45
%S A370952 1,4,9,2,11,22,35,5,39,20,41,18,43,16,45,14,47,12,49,10,51,8,53,6,55,
%T A370952 106,159,104,161,102,163,37,167,33,171,29,175,25,179,21,183,17,187,13,
%U A370952 191,100,7,197,3,201,302,96,306,92,310,88,314,84,318,80,322,76,326,72,330,68,334,64,338,60,342,56,346,52,350
%N A370952 a(1) = 1; for n > 1, a(n) is the least positive integer not already in the sequence such that a(n) == a(n-1) (mod 2*n-1).
%C A370952 Very similar to A368382, except that there the differences are controlled by the sequence {2,3,5,7,9,11,13,15,...} (A004280), whereas here they are controlled by {3,5,7,9,11,13,15,...}.
%H A370952 Chai Wah Wu, <a href="/A370952/b370952.txt">Table of n, a(n) for n = 1..10000</a>
%o A370952 (Python)
%o A370952 from itertools import count, islice
%o A370952 def A370952_gen(): # generator of terms
%o A370952     a, aset = 1, {0,1}
%o A370952     for p in count(3,2):
%o A370952         yield a
%o A370952         for b in count(a%p,p):
%o A370952             if b not in aset:
%o A370952                 aset.add(b)
%o A370952                 a = b
%o A370952                 break
%o A370952 A370952_list = list(islice(A370952_gen(),20)) # _Chai Wah Wu_, Apr 17 2024
%Y A370952 Cf. A004280, A368382, A370975, A372052 (where n appears).
%K A370952 nonn
%O A370952 1,2
%A A370952 _N. J. A. Sloane_, Mar 07 2024