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.

This page as a plain text file.
%I A336116 #19 Jul 17 2020 17:06:22
%S A336116 2,5,11,19,23,47,67,79,191,271,383,1087,1279,4111,5119,6143,16447,
%T A336116 20479,81919,262147,263167,786431,1114111,1310719,16842751,17825791,
%U A336116 1073758207,4295032831,4311744511,17180131327,21474836479,51539607551,824633720831,1168231104511
%N A336116 Primes of the form q*2^h - 1, where q is a Fermat prime.
%F A336116 For all n >= 1, A335885(a(n)) <= 2.
%t A336116 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 *)
%o A336116 (PARI)
%o A336116 A000265(n) = (n>>valuation(n,2));
%o A336116 isA019434(n) = ((n>2)&&isprime(n)&&!bitand(n-2,n-1));
%o A336116 isA336116(n) = (isprime(n)&&isA019434(A000265(1+n)));
%Y A336116 Cf. A000265, A019434, A334092, A335874, A335885, A336117.
%K A336116 nonn
%O A336116 1,1
%A A336116 _Antti Karttunen_, Jul 09 2020
%E A336116 More terms from _Jinyuan Wang_, Jul 11 2020