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.

A270388 a(n) = A048739(n-2) mod n.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 3, 1, 0, 8, 0, 1, 8, 0, 0, 13, 0, 8, 17, 1, 0, 0, 20, 1, 21, 8, 0, 19, 0, 0, 3, 1, 34, 8, 0, 1, 29, 8, 0, 7, 0, 8, 41, 1, 0, 0, 21, 31, 3, 8, 0, 13, 9, 8, 3, 1, 0, 20, 0, 1, 59, 0, 20, 49, 0, 8, 26, 1, 0, 0, 0, 1, 3, 8, 20, 49, 0, 48, 75, 1, 0, 56, 20, 1, 32, 24, 0, 49, 28, 8, 65, 1, 39, 0, 0, 85, 3, 68, 0
Offset: 2

Views

Author

Altug Alkan, Mar 16 2016

Keywords

Comments

If n is an odd prime, a(n) = 0. In other words, ((1-sqrt(2))^p + (1+sqrt(2))^p - 2) is divisible by p where p is an odd prime.

Crossrefs

Programs

  • PARI
    a048379(n) = my(w=quadgen(8));-1/2+(3/4+1/2*w)*(1+w)^n+(3/4-1/2*w)*(1-w)^n;
    a(n) = a048379(n-2) % n;

Formula

a(n) = (((1-sqrt(2))^n + (1+sqrt(2))^n - 2) / 4) mod n, for n > 1.