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.

A067834 Numbers k such that in the ring Z[sqrt(3)] the norm of (-1+sqrt(3))^k-1 is prime.

Original entry on oeis.org

2, 3, 7, 13, 19, 43, 61, 151, 257, 751, 859, 1453, 3767, 3889, 8171, 15959, 21499, 22679, 23297, 31277, 43609, 57037, 61961, 103087, 115931, 173647, 215959, 496073
Offset: 1

Views

Author

Mike Oakes, Feb 09 2002

Keywords

Comments

The definition implies that k must be a prime.
The norm of (-1+sqrt(3))^k-1 is given by (-2)^k - lucasV(-2, -2, k)+1, where lucasV(-2, -2, k) is the solution of the recurrence relation v(n) = -2*v(n-1) + 2*v(n-2) with v(0)=2 and v(1)=-2.
a(29) > 517000. - Serge Batalov, Oct 24 2024

Examples

			3 is a term because (-2)^3-lucasV(-2,-2,3)+1 = -8-(-20)+1 = 13 and 13 is prime.
		

Crossrefs

Cf. A080040.

Programs

  • Mathematica
    v[0] = 2; v[1] = -2; v[n_] := v[n] = -2*v[n-1] + 2*v[n-2] ; s = {}; Do[If[PrimeQ[(-2)^n - v[n] + 1], Print[n]; AppendTo[s, n]], {n, 8171}]; s (* Jean-François Alcover, Apr 18 2011 *)
  • PARI
    isok(n)={ispseudoprime(([0, 1; 2, 2]^n*[2; 2])[1, 1] - 2^n - (-1)^n)} \\ Andrew Howroyd, Oct 24 2024

Extensions

Corrected and extended by Aurelien Gibier, Oct 24 2024
a(28) from Serge Batalov, Oct 24 2024