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-2 of 2 results.

A200219 Number of solutions of the equation x^n + (x+1)^n = (x+2)^n (mod n) for x = 0..n-1.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 0, 8, 1, 6, 1, 4, 1, 2, 1, 8, 0, 2, 9, 2, 1, 4, 1, 16, 0, 2, 0, 12, 1, 2, 0, 8, 1, 4, 1, 2, 3, 2, 1, 16, 7, 10, 2, 2, 1, 18, 0, 8, 0, 2, 1, 8, 1, 2, 3, 32, 2, 4, 1, 4, 0, 2, 1, 24, 1, 2, 0, 4, 6, 4, 1, 16, 27, 2, 1, 8
Offset: 1

Views

Author

Michel Lagneau, Nov 14 2011

Keywords

Comments

a(n) = 0 for n = 15, 25, 33, 35, 39, 55, 57,… (see A200046).
a(n) = 1 if n prime.

Examples

			a(6) = 2 because:
for x = 3,  3^6 + 4^6 == 1(mod 6) and 5^6 == 1(mod 6).
for x = 5,  5^6 + 6^6 == 1 (mod 6) and (7)^6 == 1 (mod 6).
		

Crossrefs

Programs

  • Maple
    for n from 1 to 100 do:ii:=0:for x from 0 to n-1 do:if x^n+(x+1)^n -(x+2)^n mod n=0 then ii:=ii+1:else fi:od: printf(`%d, `,ii):od:
  • Mathematica
    Array[Function[n,Count[Array[Mod[#^n+(#+1)^n-(#+2)^n,n]&,n,0],0]],84]

A200323 For each composite m = A002808(n), a(n) is the smallest number k for which the equation x^m + (x+k)^m = (x+k+1)^m (mod m) has no solution, where x = 0..m-1.

Original entry on oeis.org

2, 3, 2, 3, 3, 2, 2, 1, 2, 3, 2, 7, 2, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 1, 2, 3, 2, 3, 4, 2, 2, 3, 2, 2, 3, 1, 2, 1, 3, 2, 2, 3, 2, 4, 3, 2, 1, 3, 2, 2, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 3, 4, 1, 2, 2, 1, 2, 3, 2, 7, 3, 2, 3, 2, 2, 3, 1, 2, 1, 2
Offset: 1

Views

Author

Michel Lagneau, Nov 16 2011

Keywords

Examples

			a(12) = 7 because A002808(12) = 21 and the equation x^21 + (x+7)^21 = (x+8)^21 (mod 21)has no solution.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 120 do: i:=0:for k from 1 to 500 while(i=0) do :ii:=0:for x from 0 to n-1 do:if x^n+(x+k)^n -(x+k+1)^n mod n =0 then ii:=ii+1:else fi:od: if ii=0 then i:=1:printf(`%d, `,k):else fi:od:od:
Showing 1-2 of 2 results.