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.

A370497 a(1) = 1; for n > 1, a(n) is smallest unused number such that a(n) is coprime to a(n-1), sopfr(a(n)) is coprime to sopfr(a(n-1)), and Omega(a(n)) does not equal Omega(a(n-1)), where sopfr(k) is the sum of the primes dividing k, with repetition.

This page as a plain text file.
%I A370497 #10 Feb 21 2024 09:51:42
%S A370497 1,2,27,4,3,10,11,6,7,8,5,9,13,12,17,14,19,15,23,16,29,18,31,20,21,37,
%T A370497 22,41,24,25,28,33,40,39,43,26,45,32,47,30,53,34,59,35,48,49,44,57,52,
%U A370497 51,56,55,54,61,36,67,38,63,46,71,42,73,50,79,58,75,62,83,60,89,64,97,65,76,69,68
%N A370497 a(1) = 1; for n > 1, a(n) is smallest unused number such that a(n) is coprime to a(n-1), sopfr(a(n)) is coprime to sopfr(a(n-1)), and Omega(a(n)) does not equal Omega(a(n-1)), where sopfr(k) is the sum of the primes dividing k, with repetition.
%C A370497 In the first 100000 terms the primes 11, 7 and 5 appear in reverse order, but all others appear in their natural order. In the same range the fixed points begin 1, 2, 4, 13, 294, 295, 296, 299, 304, 309, 640, 649. The sequence is conjectured to be a permutation of the positive numbers.
%H A370497 Scott R. Shannon, <a href="/A370497/b370497.txt">Table of n, a(n) for n = 1..10000</a>
%e A370497 a(3) = 27 as a(2) = 2 and 27 is the smallest unused number that is coprime to 2, sopfr(27) = 9 is coprime to sopfr(2) = 2, and Omega(27) = 3 does not equal Omega(2) = 1.
%o A370497 (Python)
%o A370497 from math import gcd
%o A370497 from sympy import factorint
%o A370497 from functools import cache
%o A370497 from itertools import count, islice
%o A370497 @cache
%o A370497 def sW(n):
%o A370497     f = factorint(n)
%o A370497     return (sum(p*e for p,e in f.items()), sum(f.values()))
%o A370497 def agen(): # generator of terms
%o A370497     yield 1
%o A370497     aset, an, mink = {1, 2}, 2, 3
%o A370497     while True:
%o A370497         yield an
%o A370497         s, W = sW(an)
%o A370497         an = next(k for k, sk, Wk in ((k,)+sW(k) for k in count(mink)) if k not in aset and gcd(k, an)==1 and gcd(sk, s)==1 and Wk!=W)
%o A370497         aset.add(an)
%o A370497         while mink in aset: mink += 1
%o A370497 print(list(islice(agen(), 76))) # _Michael S. Branicky_, Feb 21 2024
%Y A370497 Cf. A001414, A001222, A370496, A370047, A064413, A277272, A027748.
%K A370497 nonn
%O A370497 1,2
%A A370497 _Scott R. Shannon_, Feb 20 2024