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.

A292848 a(n) is the smallest prime of form (1/2)*((1 + sqrt(2*n))^k + (1 - sqrt(2*n))^k).

Original entry on oeis.org

3, 5, 7, 113, 11, 13, 43, 17, 19, 61, 23, 73, 79, 29, 31, 97, 103, 37, 1241463763, 41, 43, 664973, 47, 2593, 151, 53, 163, 14972833, 59, 61, 4217, 193, 67, 23801, 71, 73, 223, 229, 79, 241, 83, 7561, 61068909859, 89, 271, 277, 283, 97, 10193, 101, 103, 313
Offset: 1

Views

Author

XU Pingya, Sep 24 2017

Keywords

Comments

When 2n + 1 = p is prime, a(n) = p.
From Robert Israel, Sep 26 2017: (Start)
a(n) is also the first prime in the sequence defined by the recursion x(k+2)=2*x(k+1)+(2*n-1)*x(k) with x(0)=x(1)=1.
a(307), if it exists, has more than 10000 digits.
It appears that x(n*k) is divisible by x(k) if n is odd. Thus a(n) (if it exists) must be x(k) where k is either a power of 2 or a prime. (End)

Examples

			For k = {1, 2, 3, 4}, (1/2)((1 + sqrt(8))^k + (1 - sqrt(8))^k) = {1, 9, 25, 113}. 113 is prime, so a(4) = 113.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local a,b,t;
      a:= 1; b:= 1;
      do
        t:= a; a:= 2*a + (2*n-1)*b;
        if isprime(a) then return a fi;
        b:= t;
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 26 2017
  • Mathematica
    f[n_, k_] := ((1 + Sqrt[n])^k + (1 - Sqrt[n])^k)/2;
    Table[k = 1; While[! PrimeQ[Expand@f[2n, k]], k++]; Expand@f[2n, k], {n, 52}]