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

A206825 Number of solutions (n,k) of k^4=n^4 (mod n), where 1<=k

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 3, 2, 0, 0, 1, 0, 0, 0, 7, 0, 2, 0, 1, 0, 0, 0, 3, 4, 0, 8, 1, 0, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 1, 2, 0, 0, 7, 6, 4, 0, 1, 0, 8, 0, 3, 0, 0, 0, 1, 0, 0, 2, 15, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 4, 1, 0, 0, 0, 7, 26, 0, 0, 1, 0, 0, 0, 3, 0, 2, 0, 1, 0, 0, 0, 7, 0, 6, 2
Offset: 2

Author

Clark Kimberling, Feb 12 2012

Keywords

Examples

			8 divides exactly three of the numbers 8^4-k^4 for k = 1, 2 , ..., 7, so that a(8) = 3.
		

Crossrefs

Cf. A206590.

Programs

  • Mathematica
    s[k_] := k^4;
    f[n_, k_] := If[Mod[s[n] - s[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}]  (* A206825 *)
  • PARI
    A206825(n) = { my(n4 = n^4); sum(k=1,n-1,!((n4-(k^4))%n)); }; \\ Antti Karttunen, Nov 17 2017

A206826 Number of solutions (n,k) of s(k)=s(n) (mod n), where 1<=k

Original entry on oeis.org

0, 2, 1, 2, 1, 2, 1, 2, 3, 2, 2, 2, 3, 4, 1, 2, 1, 2, 6, 3, 3, 2, 4, 2, 3, 2, 6, 2, 5, 2, 1, 3, 3, 8, 3, 2, 3, 4, 6, 2, 3, 2, 6, 3, 3, 2, 2, 2, 3, 5, 6, 2, 1, 8, 6, 5, 3, 2, 8, 2, 3, 5, 1, 8, 5, 2, 6, 4, 12, 2, 2, 2, 3, 3, 6, 8, 4, 2, 6, 2, 3, 2, 8, 8, 3, 3, 6, 2, 5, 8, 6, 4, 3, 8, 2, 2, 3, 4, 6
Offset: 1

Author

Clark Kimberling, Feb 12 2012

Keywords

Examples

			5 divides exactly two of the numbers s(n)-s(k) for k=1,2,3,4, so that a(5)=2.
		

Crossrefs

Cf. A206590.

Programs

  • Mathematica
    s[k_] := k (k + 1) (k + 2)/6;
    f[n_, k_] := If[Mod[s[n] - s[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}]  (* A206826 *)
Showing 1-3 of 3 results.