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.
%I A376511 #22 Apr 02 2025 15:09:01 %S A376511 2,2,4,4,15,8,6,5,5,21,10,7,7,33,14,9,6,35,12,7,38,21,185,42,12,95,24, %T A376511 9,65,18,8,39,16,8,114,24,215,48,11,11,57,22,13,13,69,26,15,161,30,10, %U A376511 51,20,9,92,27,9,155,36,10,209,30,371,60,12,186,36,335,72 %N A376511 a(1) = 2. For n > 1, if a(n-1) is a novel term, a(n)=A001414(a(n-1)), else if there are k (>1) occurrences of a(j) = a(n-1) (1<=j<=n-1), a(n) is the smallest novel m such that A001414(m) = k*a(n-1). %C A376511 Sequence inspired by a revisit to A353125. a(n) is a novel prime p iff a(n-1) is a term in A046363, following which a(n+1) is also = p. The first occurrences of 4 or p are followed by 4 or p respectively (4 being the only composite m such that Sopfr(m)=m), and these are the only terms repeated contiguously in this sequence. 3 cannot be a term because it is not given, and there is no composite g such that Sopfr(g)=3. A string of descending composite terms follows primes p,p until reaching (i) a repeat of an earlier term, or (ii) a term in A046363 (which produces a new prime pair q,q). If (i) the sequence resets immediately to a new string of descending composite terms, and if (ii) the reset occurs after the next pair q,q of primes. Every positive integer m (other than 3) occurs a maximum of A000607(m) times, this being the number of numbers k such that Sopfr(k)=m. %C A376511 Row n of table T(n,k) in A064364 lists numbers j such that A001414(j) = n, with T(n,1) = A056240(n), and every term in this sequence is taken from the appropriate row of A064364. When a(n-1) is a novel term a(n) = A001414(a(n-1)), which is defined. Otherwise a(n) = smallest m such that A001414(m) = k*a(n-1), a number which is also defined since it is the smallest unused term in T(k*a(n-1),k) of A064364. Therefore the sequence is well defined and infinite. Conjecture: For any n > 1 every term in T(n,k) of A064364 appears eventually. %H A376511 Michael De Vlieger, <a href="/A376511/b376511.txt">Table of n, a(n) for n = 1..5000</a> %H A376511 Michael De Vlieger, <a href="/A376511/a376511.png">Log log scatterplot of a(n)</a>, n = 1..5000, showing primes in red, perfect powers of primes in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and purple, with purple additionally representing powerful numbers that are not prime powers. Primes first appear in pairs. %F A376511 If a(k) = first occasion of prime p, a(k+1) = p, a(k+2) = A056240(2*p), a(k+3) = 2*p. %e A376511 a(1) = 2 is given, then since 2 is a novel term, a(2) = A001414(2) = 2. 2 has now been seen k = 2 times so a(3) is the smallest novel m such that A001414(m) = 2*2 = 4, so a(3) = 4, a novel term meaning that a(4) = A001414(4) = 4. now 4 has been seen twice so a(5) is the smallest novel m such that A001414(m) = 2*4 = 8, so a(5) = 15. %t A376511 nn = 120; c[_] := 0; j = a[1] = 2; u = 2; %t A376511 f[x_] := f[x] = Total@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[x]]; %t A376511 s = PositionIndex@ Array[f, 2^16]; %t A376511 Do[If[Set[m, c[j]] == 0, Set[k, f[j]], %t A376511 Set[{k, t, w}, {1, #, Length[#]}] &@Lookup[s, (m + 1)*j]; %t A376511 While[c[t[[k]]] > 0, k++]; k = t[[k]] ]; c[j]++; %t A376511 Set[{a[i], j}, {k, k}], {i, 2, nn}]; %t A376511 Array[a, nn] (* _Michael De Vlieger_, Sep 27 2024 *) %Y A376511 Cf. A000040, A000607, A000792, A001414, A046363, A056240, A064364, A353125, A376147. %K A376511 nonn %O A376511 1,1 %A A376511 _David James Sycamore_, Sep 25 2024