A206588
Number of solutions k of prime(k)=prime(n) (mod n), where 1<=k
0, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 1, 2, 2, 0, 2, 1, 2, 1, 1, 1, 2, 1, 1, 0, 2, 0, 3, 1, 2, 2, 3, 1, 3, 1, 1, 2, 2, 1, 3, 1, 3, 2, 2, 1, 3, 1, 3, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 0, 1, 1, 0, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 3, 0, 3, 0, 1, 1, 2, 0, 4, 1, 2, 1, 3, 1, 5, 1, 1, 0, 1, 0, 2, 0, 2, 1, 2
Offset: 2
Keywords
A345931 a(n) = gcd(n, A002034(n)), where A002034(n) gives the smallest positive integer k such that n divides k!.
1, 2, 3, 4, 5, 3, 7, 4, 3, 5, 11, 4, 13, 7, 5, 2, 17, 6, 19, 5, 7, 11, 23, 4, 5, 13, 9, 7, 29, 5, 31, 8, 11, 17, 7, 6, 37, 19, 13, 5, 41, 7, 43, 11, 3, 23, 47, 6, 7, 10, 17, 13, 53, 9, 11, 7, 19, 29, 59, 5, 61, 31, 7, 8, 13, 11, 67, 17, 23, 7, 71, 6, 73, 37, 5, 19, 11, 13, 79, 2, 9, 41, 83, 7, 17, 43, 29, 11, 89
Offset: 1
Keywords
Links
Programs
-
Mathematica
Table[GCD[n,m=1;While[Mod[m!,n]!=0,m++];m],{n,100}] (* Giorgos Kalogeropoulos, Jul 02 2021 *)
-
PARI
A002034(n) = if(1==n,n,my(s=factor(n)[, 1], k=s[#s], f=Mod(k!, n)); while(f, f*=k++); (k)); \\ After code in A002034. A345931(n) = gcd(n, A002034(n));
A072458 Shadow transform of Catalan numbers A000108.
0, 1, 0, 0, 0, 1, 1, 2, 0, 0, 1, 4, 1, 5, 4, 1, 0, 7, 2, 8, 3, 3, 7, 10, 2, 3, 9, 0, 5, 13, 9, 14, 0, 6, 12, 4, 3, 17, 14, 8, 4, 19, 8, 20, 9, 8, 19, 22, 1, 8, 6, 10, 12, 25, 6, 11, 11, 15, 25, 28, 14, 29, 28, 10, 0, 10, 15, 32, 19, 22, 17, 34, 11, 35, 32, 15, 22, 17, 21, 38, 3, 0, 36, 40, 19, 21
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..4000
- Lorenz Halbeisen and Norbert Hungerbuehler, Number theoretic aspects of a combinatorial function, Notes on Number Theory and Discrete Mathematics 5(4) (1999), 138-150; see Definition 7 for the shadow transform.
- N. J. A. Sloane, Transforms.
Crossrefs
Cf. A072480.
Programs
-
Maple
a:= n-> add(`if`(modp(binomial(2*j,j)/(j+1), n)=0, 1, 0), j=0..n-1): seq(a(n), n=0..120); # Alois P. Heinz, Sep 16 2019
-
Mathematica
a[n_] := Sum[If[Mod[Binomial[2*j, j]/(j+1), n] == 0, 1, 0], {j, 0, n-1}]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Jan 07 2025, after Alois P. Heinz *)
Comments
Examples
Crossrefs
Programs
Mathematica