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.

A113878 a(1)=0; a(n+1) is the least number > a(n) such that Sum_{k=1..n+1} 2^a(k) is not composite.

This page as a plain text file.
%I A113878 #17 Jul 12 2021 02:04:18
%S A113878 0,1,2,4,7,16,53,66,207,1752,5041,6310
%N A113878 a(1)=0; a(n+1) is the least number > a(n) such that Sum_{k=1..n+1} 2^a(k) is not composite.
%C A113878 Base-2 logarithms of A073924.
%C A113878 a(13) > 50000. - _Don Reble_
%t A113878 a[1] = 0; a[n_] := a[n] = Block[{k = a[n - 1] + 1, s = Plus @@ (2^Array[a, n - 1])}, While[ !PrimeQ[s + 2^k], k++ ]; k]; Array[a, 12] (* _Robert G. Wilson v_ *)
%o A113878 (Python)
%o A113878 from sympy import isprime
%o A113878 def afind(limit):
%o A113878     print("0, 1", end=", ")
%o A113878     s, pow2 = 2**0 + 2**1, 2**2
%o A113878     for m in range(2, limit+1):
%o A113878         if isprime(s+pow2): print(m, end=", "); s += pow2
%o A113878         pow2 *= 2
%o A113878 afind(2000) # _Michael S. Branicky_, Jul 11 2021
%Y A113878 Cf. A073924, A080355, A080567, A113824.
%K A113878 nonn,more
%O A113878 1,3
%A A113878 _Artur Jasinski_, Jan 27 2006
%E A113878 Edited by _Don Reble_, Feb 17 2006