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.

A260821 Least positive integer k for which n*2^(2^k) + 1 is composite.

This page as a plain text file.
%I A260821 #22 Jan 31 2024 08:07:19
%S A260821 5,1,2,2,1,1,3,1,2,2,1,1,2,1,3,1,1,2,1,1,1,3,1,2,3,1,3,3,1,1,1,1,1,2,
%T A260821 1,1,5,1,2,1,1,1,2,1,2,1,1,4,2,1,1,1,1,1,1,1,2,3,1,2,1,1,1,2,1,1,2,1,
%U A260821 2,2,1,1,2,1,1,1,1,3,2,1,1,1,1,2,1,1,2
%N A260821 Least positive integer k for which n*2^(2^k) + 1 is composite.
%C A260821 a(n) = 1 for nonzero n in A045751. - _Michel Marcus_, Aug 01 2015
%H A260821 Paolo Xausa, <a href="/A260821/b260821.txt">Table of n, a(n) for n = 1..10000</a>
%e A260821 a(7)=3 because 7*2^2 + 1 = 29 is prime and 7*2^(2^2) + 1 = 113 is also prime, while 7*2^(2^3) + 1 = 11*163.
%t A260821 A260821[n_] := Module[{k = 0}, While[PrimeQ[n*2^(2^++k) + 1]]; k];
%t A260821 Array[A260821, 100] (* _Paolo Xausa_, Jan 31 2024 *)
%o A260821 (PARI) a(n) = {k = 1; while (isprime(n*2^2^k+1), k++); k;} \\ _Michel Marcus_, Aug 01 2015
%Y A260821 Cf. A045751, A005098.
%K A260821 nonn
%O A260821 1,1
%A A260821 _Marco RipĂ _, Jul 31 2015
%E A260821 More terms from _Michel Marcus_, Aug 01 2015