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).
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, 106, 159, 104, 161, 102, 163, 37, 167, 33, 171, 29, 175, 25, 179, 21, 183, 17, 187, 13, 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
Offset: 1
Keywords
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Programs
-
Python
from itertools import count, islice def A370952_gen(): # generator of terms a, aset = 1, {0,1} for p in count(3,2): yield a for b in count(a%p,p): if b not in aset: aset.add(b) a = b break A370952_list = list(islice(A370952_gen(),20)) # Chai Wah Wu, Apr 17 2024
Comments