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.

A336116 Primes of the form q*2^h - 1, where q is a Fermat prime.

Original entry on oeis.org

2, 5, 11, 19, 23, 47, 67, 79, 191, 271, 383, 1087, 1279, 4111, 5119, 6143, 16447, 20479, 81919, 262147, 263167, 786431, 1114111, 1310719, 16842751, 17825791, 1073758207, 4295032831, 4311744511, 17180131327, 21474836479, 51539607551, 824633720831, 1168231104511
Offset: 1

Views

Author

Antti Karttunen, Jul 09 2020

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[NestWhile[NextPrime, #, ! (PrimeQ[#2] && With[{p = NestWhile[BitShiftRight, #2 + 1, EvenQ] - 1}, BitAnd[p, p - 1] == 0 && With[{b = BitLength[p]}, BitAnd[b - 1, b - 2] == 0]]) &, 2] &, 2, 25] (* Jan Mangaldan, Jul 14 2020 *)
  • PARI
    A000265(n) = (n>>valuation(n,2));
    isA019434(n) = ((n>2)&&isprime(n)&&!bitand(n-2,n-1));
    isA336116(n) = (isprime(n)&&isA019434(A000265(1+n)));

Formula

For all n >= 1, A335885(a(n)) <= 2.

Extensions

More terms from Jinyuan Wang, Jul 11 2020