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.

Showing 1-3 of 3 results.

A206588 Number of solutions k of prime(k)=prime(n) (mod n), where 1<=k

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Feb 09 2012

Keywords

Comments

In the following guide to related sequences, c(n) is the number of solutions (n,k) of s(k)=s(n) (mod n), where 1<=k
s(n).............c(n)
prime(n).........A206588
prime(n+1).......A206589
n^2..............A057918
n^3..............A206590
Fibonacci(n+1)...A206713
2^(n-1)..........A206714
n!...............A072480
n(n+1)/2.........A206824
n^4..............A206825
n(n+1)(n+2)/6....A206826
n(n+1)(2n+1)/6...A206827
C(2n,n)..........A206828
For some choices of s, the limiting frequency of 0's in c appears to be a positive constant.

Examples

			For k=1 to 7, the numbers p(8)-p(k) are 17,16,14,12,8,6,4, so that a(8)=2.
		

Crossrefs

Cf. A206589.

Programs

  • Mathematica
    f[n_, k_] := If[Mod[Prime[n] - Prime[k], n] == 0, 1, 0];
    t[n_] := Flatten[Table[f[n, k], {k, 1, n - 1}]]
    a[n_] := Count[Flatten[t[n]], 1]
    Table[a[n], {n, 2, 120}]  (* A206588 *)

A345931 a(n) = gcd(n, A002034(n)), where A002034(n) gives the smallest positive integer k such that n divides k!.

Original entry on oeis.org

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

Author

Antti Karttunen, Jul 01 2021

Keywords

Crossrefs

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));

Formula

a(n) = gcd(n, A002034(n)) = gcd(n, A072480(n)) = gcd(A002034(n), A072480(n)).
a(n) = A002034(n) / A345932(n).
a(n) = n / A345933(n).

A072458 Shadow transform of Catalan numbers A000108.

Original entry on oeis.org

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

Author

N. J. A. Sloane, Aug 02 2002, corrected Aug 21 2002

Keywords

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 *)
Showing 1-3 of 3 results.