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.

A331182 Number of values of k, 1 <= k <= n, with A083254(k) = A083254(n), where A083254(n) = 2*phi(n) - n.

This page as a plain text file.
%I A331182 #10 Jan 12 2022 03:21:14
%S A331182 1,1,2,2,1,1,1,3,2,2,1,1,1,3,3,4,1,1,1,2,3,4,1,1,2,5,2,3,1,1,1,5,1,6,
%T A331182 1,1,1,7,3,2,1,1,1,4,4,8,1,1,2,1,2,5,1,2,1,3,3,9,1,1,1,10,4,6,1,1,1,6,
%U A331182 1,1,1,1,1,11,2,7,1,1,1,2,2,12,1,1,2,13,2,4,1,1,1,8,3,14,1,1,1,2,2,1,1,1,1,5,1
%N A331182 Number of values of k, 1 <= k <= n, with A083254(k) = A083254(n), where A083254(n) = 2*phi(n) - n.
%C A331182 Ordinal transform of A083254.
%H A331182 Antti Karttunen, <a href="/A331182/b331182.txt">Table of n, a(n) for n = 1..65537</a>
%t A331182 Module[{b}, b[_] = 0;
%t A331182 a[n_] := With[{t = 2 EulerPhi[n] - n}, b[t] = b[t] + 1]];
%t A331182 Array[a, 105] (* _Jean-François Alcover_, Jan 12 2022 *)
%o A331182 (PARI)
%o A331182 up_to = 65537;
%o A331182 ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
%o A331182 A083254(n) = (2*eulerphi(n)-n);
%o A331182 v331182 = ordinal_transform(vector(up_to,n,A083254(n)));
%o A331182 A331182(n) = v331182[n];
%Y A331182 Cf. A000010, A083254.
%Y A331182 Cf. also A081373, A331175, A331181.
%K A331182 nonn
%O A331182 1,3
%A A331182 _Antti Karttunen_, Jan 11 2020