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.

A379883 a(1) = 1. Let j = a(n-1) and r = A046144(j). Then for n > 1, if j is novel and r > 0, a(n) = r. If j is novel and r = 0 then a(n) = 1. If j has occurred k (>1) times already then a(n) = k*j.

This page as a plain text file.
%I A379883 #32 Aug 03 2025 16:05:19
%S A379883 1,1,2,1,3,1,4,1,5,2,4,8,1,6,1,7,2,6,12,1,8,16,1,9,2,8,24,1,10,2,10,
%T A379883 20,1,11,4,12,24,48,1,12,36,1,13,4,16,32,1,14,2,12,48,96,1,15,1,16,48,
%U A379883 144,1,17,8,32,64,1,18,2,14,28,1,19,6,18,36,72,1,20,40,1,21,1,22,4,20,60,1,23,10,30,1,24,72,144,288,1,25,8,40,80,1,26,4
%N A379883 a(1) = 1. Let j = a(n-1) and r = A046144(j). Then for n > 1, if j is novel and r > 0, a(n) = r. If j is novel and r = 0 then a(n) = 1. If j has occurred k (>1) times already then a(n) = k*j.
%C A379883 In other words if j = a(n-1) has not occurred earlier and has r (> 0) primitive roots then a(n) = r. Cases where novel A046144(j) = 0 cannot be counted multiplicatively (as k*j) for repeats, so a(n) = 1 is designed to permit the sequence to continue past such points, which means including in the count of 1's terms following (1,2,3,4,6), for which it is true that r = 1. Terms beyond a(12) = 8 which count the number of 1's (by the second condition) give the cardinality of terms with no primitive roots, plus the few (5) cases of terms with primitive root = 1.
%C A379883 Every even number m in A380594 appears finitely many times, consequent to occasions of integers v (>6) for which A046144(v) = m, and to repetitions (k*j) = m for j even. However every odd number appears once only (consequent to odd counts of 1's). The odd numbers appear in order, and since 2 precedes all of them, the primes are in order.
%H A379883 Michael De Vlieger, <a href="/A379883/b379883.txt">Table of n, a(n) for n = 1..10000</a>
%H A379883 Michael De Vlieger, <a href="/A379883/a379883.png">Log log scatterplot of a(n)</a>, n = 1..2^20.
%e A379883 a(2) = 1 since a(1)=1 and and 1 has one primitive root. Since 1 has been seen twice, a(3) = 2 and then a(4) = 1 since 2 is a novel term with one primitive root.
%e A379883 a(9) = 5, a novel term with two primitive roots so a(10) = 2, which has appeared once before (a(3)=2), so a(11) = 4, the second occurrence of 4 so a(12) = 8, a novel term with no primitive roots, meaning that a(13) = 1. The count of 1's is now 6, so a(14) = 6, meaning 5 prior terms with one primitive root and one with none.
%t A379883 nn = 120; c[_] := 0; j = 1;
%t A379883 f[x_] := f[x] = Which[
%t A379883   x == 1, 1,
%t A379883   IntegerQ[PrimitiveRoot[x]], Nest[EulerPhi, x, 2],
%t A379883   True, 0];
%t A379883 {j}~Join~Reap[Monitor[Do[
%t A379883   If[c[j] == 0,
%t A379883     Set[k, # + Boole[# == 0]] &[f[j]]; c[j]++,
%t A379883     k = ++c[j]*j ];
%t A379883 j = Sow[k], {n, 2, nn}], n] ][[-1, 1]] (* _Michael De Vlieger_, Jan 09 2025 *)
%Y A379883 Cf. A046144, A378508, A380594, A380604.
%K A379883 nonn,easy
%O A379883 1,3
%A A379883 _David James Sycamore_, Jan 09 2025
%E A379883 a(78)=1 inserted by _David Radcliffe_, Aug 03 2025