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.

A262978 Exponents n such that 2^n-1 and 2^n+1 are squarefree.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 11, 13, 14, 16, 17, 19, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 41, 43, 44, 46, 47, 49, 52, 53, 56, 58, 59, 61, 62, 64, 65, 67, 71, 73, 74, 76, 77, 79, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 101, 103, 104, 106, 107, 109, 112, 113, 115, 116, 118, 119
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 01 2016

Keywords

Examples

			a(4) = 5 because 2^5 - 1 = 31 and 2^5 + 1 = 33 are squarefree numbers.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..120] | IsSquarefree(2^n-1) and IsSquarefree(2^n+1)];
    
  • Mathematica
    Select[Range[120],AllTrue[2^#+{1,-1},SquareFreeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 20 2019 *)
  • PARI
    is(n)=issquarefree(2^n-1) && issquarefree(2^n+1) \\ Charles R Greathouse IV, May 02 2016

Formula

2^a(n) = A269758(n).