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.

A330756 Number of values of k, 1 <= k <= n, with A063994(k) = A063994(n), where A063994(n) = Product_{primes p dividing n} gcd(p-1, n-1).

This page as a plain text file.
%I A330756 #14 Jan 12 2022 03:21:19
%S A330756 1,2,1,3,1,4,1,5,2,6,1,7,1,8,2,9,1,10,1,11,3,12,1,13,4,14,3,1,1,15,1,
%T A330756 16,5,17,6,18,1,19,7,20,1,21,1,22,1,23,1,24,2,25,8,2,1,26,9,27,10,28,
%U A330756 1,29,1,30,11,31,2,1,1,32,12,3,1,33,1,34,13,4,14,35,1,36,4,37,1,38,3,39,15,40,1,41,2,42,16
%N A330756 Number of values of k, 1 <= k <= n, with A063994(k) = A063994(n), where A063994(n) = Product_{primes p dividing n} gcd(p-1, n-1).
%C A330756 Ordinal transform of A063994.
%H A330756 Antti Karttunen, <a href="/A330756/b330756.txt">Table of n, a(n) for n = 1..65537</a>
%t A330756 A063994[n_] := If[n==1, 1, Times @@ GCD[n-1, First /@ FactorInteger[n]-1]];
%t A330756 Module[{b}, b[_] = 0;
%t A330756 a[n_] := With[{t = A063994[n]}, b[t] = b[t]+1]];
%t A330756 Array[a, 105] (* _Jean-François Alcover_, Jan 12 2022 *)
%o A330756 (PARI)
%o A330756 up_to = 65537;
%o A330756 A063994(n) = { my(f=factor(n)[, 1]); prod(i=1, #f, gcd(f[i]-1, n-1)); }; \\ From A063994
%o A330756 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 A330756 v330756 = ordinal_transform(vector(up_to, n, A063994(n)));
%o A330756 A330756(n) = v330756[n];
%Y A330756 Cf. A063994, A209211.
%Y A330756 Cf. also A081373, A303756, A330747.
%K A330756 nonn
%O A330756 1,2
%A A330756 _Antti Karttunen_, Dec 30 2019