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.

A108352 a(n) = primal code characteristic of n, which is the least positive integer, if any, such that (n o)^k = 1, otherwise equal to 0. Here "o" denotes the primal composition operator, as illustrated in A106177 and A108371 and (n o)^k = n o ... o n, with k occurrences of n.

This page as a plain text file.
%I A108352 #40 Nov 23 2019 13:45:21
%S A108352 1,0,2,2,2,0,2,2,0,0,2,0,2,0,2,2,2,0,2,3,2,0,2,3,2,0,2,3,2,0,2,2,2,0,
%T A108352 2,0,2,0,2,0,2,0,2,3,0,0,2,3,2,0,2,3,2,0,2,3,2,0,2,0,2,0,0,2,2,0,2,3,
%U A108352 2,0,2,0,2,0,3,3,2,0,2,3,2,0,2,0,2,0,2,3,2,0,2,3,2,0,2,3,2,0,0,2,2,0,2,3,2
%N A108352 a(n) = primal code characteristic of n, which is the least positive integer, if any, such that (n o)^k = 1, otherwise equal to 0. Here "o" denotes the primal composition operator, as illustrated in A106177 and A108371 and (n o)^k = n o ... o n, with k occurrences of n.
%H A108352 Antti Karttunen, <a href="/A108352/b108352.txt">Table of n, a(n) for n = 1..100000</a>
%H A108352 Jon Awbrey, <a href="https://oeis.org/wiki/Riffs_and_Rotes">Riffs and Rotes</a>
%H A108352 Jon Awbrey, <a href="/A108352/a108352.txt">Primal Code Characteristic, n = 1 to 3000</a> (Note: values given here differ at n = 718, 746, 1156, 1449, 1734 and 1804 from those computed in b-file). - _Antti Karttunen_, Nov 23 2019
%F A108352 a(A065091(n)) = 2 for all n, a(A001747(n)) = 0 for all n, except n=2, and a(A046315(n)) = 2 for n > 1. - _Antti Karttunen_, Nov 20 2019
%e A108352 a(1) = 1 because (1 o)^1 = ({ } o)^1 = 1.
%e A108352 a(2) = 0 because (2 o)^k = (1:1 o)^k = 2, for all positive k.
%e A108352 a(3) = 2 because (3 o)^2 = (2:1 o)^2 = 1.
%e A108352 a(4) = 2 because (4 o)^2 = (1:2 o)^2 = 1.
%e A108352 a(5) = 2 because (5 o)^2 = (3:1 o)^2 = 1.
%e A108352 a(6) = 0 because (6 o)^k = (1:1 2:1 o)^k = 6, for all positive k.
%e A108352 a(7) = 2 because (7 o)^2 = (4:1 o)^1 = 1.
%e A108352 a(8) = 2 because (8 o)^2 = (1:3 o)^1 = 1.
%e A108352 a(9) = 0 because (9 o)^k = (2:2 o)^k = 9, for all positive k.
%e A108352 a(10) = 0 because (10 o)^k = (1:1 3:1 o)^k = 10, for all positive k.
%e A108352 Detail of calculation for compositional powers of 12:
%e A108352 (12 o)^2 = (1:2 2:1) o (1:2 2:1) = (1:1 2:2) = 18
%e A108352 (12 o)^3 = (1:1 2:2) o (1:2 2:1) = (1:2 2:1) = 12
%e A108352 Detail of calculation for compositional powers of 20:
%e A108352 (20 o)^2 = (1:2 3:1) o (1:2 3:1) = (3:2) = 25
%e A108352 (20 o)^3 = (3:2) o (1:2 3:1) = 1.
%e A108352 From _Antti Karttunen_, Nov 20 2019: (Start)
%e A108352 For n=718, because 718 = prime(1)^1 * prime(72)^1, its partial function primal code is (1:1 72:1), which, when composed with itself stays same (that is, A106177(718,718) = 718), thus, as 1 is never reached, a(718) = 0, like is true for all even nonsquare semiprimes.
%e A108352 For n=1804, as 1804 = prime(1)^2 * prime(5)^1 * prime(13)^1, its primal code is (1:2 5:1 13:1), which, when composed with itself yields 203401 = prime(5)^2 * prime(13)^2, i.e., primal code (5:2 13:2), which when composed with (1:2 5:1 13:1) yields 1, which happened on the second iteration, thus a(1804) = 2+1 = 3.
%e A108352 (End)
%o A108352 (PARI)
%o A108352 A106177sq(n,k) = { my(f = factor(k)); prod(i=1,#f~,f[i, 1]^valuation(n, prime(f[i, 2]))); }; \\ As in A106177.
%o A108352 A108352(n) = { my(orgn=n,xs=Set([]), k=1); while(n>1, if(vecsearch(xs,n), return(0)); xs = setunion([n],xs); n = A106177sq(n,orgn); k++); (k); }; \\ _Antti Karttunen_, Nov 20 2019
%Y A108352 Cf. A001747, A046315, A055231, A061396, A062504, A062537, A062860, A065091, A106177, A106178.
%Y A108352 Cf. A108353, A108370, A108371, A108372, A108373, A108374, A111801.
%K A108352 nonn
%O A108352 1,3
%A A108352 _Jon Awbrey_, May 31 2005, revised Jun 01 2005
%E A108352 Links and cross-references added, Aug 19 2005
%E A108352 Term a(63) corrected and five more terms added (up to a(105)) by _Antti Karttunen_, Nov 20 2019