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.

A028871 Primes of the form k^2 - 2.

Original entry on oeis.org

2, 7, 23, 47, 79, 167, 223, 359, 439, 727, 839, 1087, 1223, 1367, 1847, 2207, 2399, 3023, 3719, 3967, 4759, 5039, 5623, 5927, 7919, 8647, 10607, 11447, 13687, 14159, 14639, 16127, 17159, 18223, 19319, 21023, 24023, 25919, 28559, 29927
Offset: 1

Views

Author

Keywords

Comments

Except for the initial term, primes equal to the product of two consecutive even numbers minus 1. - Giovanni Teofilatto, Sep 24 2004
With exception of the first term 2, primes p such that continued fraction of (1+sqrt(p))/2 have period 4. - Artur Jasinski, Feb 03 2010
Subsequence of A094786. First primes q that are in A094786 but not here are 241, 3373, 6857, 19681, 29789, 50651, 300761, 371291, ...; q+2 are perfect powers m^k with odd k>1. - Zak Seidov, Dec 09 2014

References

  • D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 31.

Crossrefs

Cf. A028870, A089623, A010051, A094786; subsequence of A008865.

Programs

  • Haskell
    a028871 n = a028871_list !! (n-1)
    a028871_list = filter ((== 1) . a010051') a008865_list
    -- Reinhard Zumkeller, May 06 2013
    
  • Magma
    [p: p in PrimesUpTo(100000)| IsSquare(p+2)]; // Vincenzo Librandi, Jun 19 2014
  • Maple
    select(isprime, [2,seq((2*n+1)^2-2, n=1..1000)]); # Robert Israel, Dec 09 2014
  • Mathematica
    lst={};Do[s=n^2;If[PrimeQ[p=s-2], AppendTo[lst, p]], {n, 6!}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 26 2008 *)
    aa = {}; Do[If[4 == Length[ContinuedFraction[(1 + Sqrt[Prime[m]])/2][[2]]], AppendTo[aa, Prime[m]]], {m, 1, 1000}]; aa (* Artur Jasinski, Feb 03 2010 *)
    Select[Table[n^2 - 2, {n, 400}], PrimeQ] (* Vincenzo Librandi, Jun 19 2014 *)
  • PARI
    list(lim)=select(n->isprime(n),vector(sqrtint(floor(lim)+2),k,k^2-2)) \\ Charles R Greathouse IV, Jul 25 2011
    

Formula

a(n) = A028870(n)^2 -2. - R. J. Mathar, Dec 12 2023

A155897 Square matrix T(m,n)=1 if (2m+1)^n-2 is prime, 0 otherwise; read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2009

Keywords

Comments

In some sense a "minimal" possible generalization of the pattern of Mersenne primes (cf. A000043) is to consider powers of odd numbers (> 1) minus 2. Since even powers obviously correspond to an odd power of the base squared, it is sufficient to consider only odd powers, cf. A155899.

Crossrefs

Programs

  • PARI
    T = matrix( 19,19,m,n, isprime((2*m+1)^n-2)) ;
    A155897 = concat( vector( vecmin( matsize(T)), i, vector( i, j, T[j,i-j+1])))
Showing 1-2 of 2 results.