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.

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

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