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.

A378252 Least prime power > 2^n.

This page as a plain text file.
%I A378252 #15 Dec 03 2024 08:40:49
%S A378252 2,3,5,9,17,37,67,131,257,521,1031,2053,4099,8209,16411,32771,65537,
%T A378252 131101,262147,524309,1048583,2097169,4194319,8388617,16777259,
%U A378252 33554467,67108879,134217757,268435459,536870923,1073741827,2147483659,4294967311,8589934609
%N A378252 Least prime power > 2^n.
%C A378252 Prime powers are listed by A246655.
%C A378252 Conjecture: All terms except 9 are prime. Hence this is the same as A014210 after 9. Confirmed up to n = 1000.
%t A378252 Table[NestWhile[#+1&,2^n+1,!PrimePowerQ[#]&],{n,0,20}]
%o A378252 (Python)
%o A378252 from itertools import count
%o A378252 from sympy import primefactors
%o A378252 def A378252(n): return next(i for i in count(1+(1<<n)) if len(primefactors(i))==1) # _Chai Wah Wu_, Dec 02 2024
%o A378252 (PARI) a(n) = my(x=2^n+1); while (!isprimepower(x), x++); x; \\ _Michel Marcus_, Dec 03 2024
%Y A378252 Subtracting 2^n appears to give A013597 except at term 3.
%Y A378252 For prime we have A014210.
%Y A378252 For previous we have A014234.
%Y A378252 For perfect power we have A357751.
%Y A378252 For squarefree we have A372683.
%Y A378252 A000015 gives the least prime power >= n.
%Y A378252 A000040 lists the primes, differences A001223.
%Y A378252 A000961 and A246655 list the prime powers, differences A057820.
%Y A378252 A024619 and A361102 list the non prime powers, diffs A375708 and A375735.
%Y A378252 A031218 gives the greatest prime power <= n.
%Y A378252 A244508 counts prime powers between powers of 2.
%Y A378252 Prime powers between primes are counted by A080101 and A366833.
%Y A378252 Cf. A007918, A037035, A053707, A059305, A065514, A069584, A151800, A304521, A377051, A377282, A377283, A377289, A377432, A378249.
%K A378252 nonn
%O A378252 0,1
%A A378252 _Gus Wiseman_, Nov 30 2024