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.

A072480 Shadow transform of factorials A000142.

This page as a plain text file.
%I A072480 #33 Sep 17 2019 12:06:04
%S A072480 0,1,0,0,0,0,3,0,4,3,5,0,8,0,7,10,10,0,12,0,15,14,11,0,20,15,13,18,21,
%T A072480 0,25,0,24,22,17,28,30,0,19,26,35,0,35,0,33,39,23,0,42,35,40,34,39,0,
%U A072480 45,44,49,38,29,0,55,0,31,56,56,52,55,0,51,46,63,0,66,0,37,65,57,66,65
%N A072480 Shadow transform of factorials A000142.
%C A072480 For n > 1, a(n) is the number of solutions (n,k) of k! = n! (mod n) where 1 <= k < n. - _Clark Kimberling_, Feb 11 2012
%C A072480 For n > 1, a(n) is the smallest number k such that n divides (n - k)! but not (n - k - 1)!. - _Jianing Song_, Aug 29 2018
%H A072480 Antti Karttunen, <a href="/A072480/b072480.txt">Table of n, a(n) for n = 0..65537</a>
%H A072480 Lorenz Halbeisen and Norbert Hungerbuehler, Number theoretic aspects of a combinatorial function, Notes on Number Theory and Discrete Mathematics 5(4) (1999), 138-150. (<a href="http://math.berkeley.edu/~halbeis/publications/psf/seq.ps">ps</a>, <a href="http://math.berkeley.edu/~halbeis/publications/pdf/seq.pdf">pdf</a>); see Definition 7 for the shadow transform.
%H A072480 OEIS Wiki, <a href="https://oeis.org/wiki/Shadow_transform">Shadow transform</a>.
%H A072480 N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>.
%F A072480 For n > 1, a(n) = n - A002034(n).
%p A072480 a:= n-> add(`if`(modp(j!, n)=0, 1, 0), j=0..n-1):
%p A072480 seq(a(n), n=0..120);  # _Alois P. Heinz_, Sep 16 2019
%t A072480 s[k_] := k!;
%t A072480 f[n_, k_] := If[Mod[s[n] - s[k], n] == 0, 1, 0];
%t A072480 t[n_] := Flatten[Table[f[n, k], {k, 1, n - 1}]]
%t A072480 a[n_] := Count[Flatten[t[n]], 1]
%t A072480 Table[a[n], {n, 2, 420}] (* A072480 *)
%t A072480 Flatten[Position[%, 0]]  (* A006093, primes-1 *)
%t A072480 (* Agrees with A072480 for n > 1, from _Clark Kimberling_, Feb 12 2012 *)
%o A072480 (PARI)
%o A072480 A002034(n) = if(1==n,n,my(s=factor(n)[, 1], k=s[#s], f=Mod(k!, n)); while(f, f*=k++); (k)); \\ From A002034
%o A072480 A072480(n) = if(n<2,n,(n-A002034(n))); \\ _Antti Karttunen_, Oct 01 2018
%Y A072480 Cf. A000142, A002034, A072458.
%K A072480 nonn,easy
%O A072480 0,7
%A A072480 _N. J. A. Sloane_ and _Vladeta Jovovic_, Aug 02 2002