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.

A354456 a(n) is the least number k such that k - 5^i is prime for i = 1..n.

This page as a plain text file.
%I A354456 #23 May 31 2022 06:48:53
%S A354456 7,28,132,666,3234,17514,100674,501228,2062662,211097334,2597411082,
%T A354456 34473310284,214852200444,394471192794
%N A354456 a(n) is the least number k such that k - 5^i is prime for i = 1..n.
%C A354456 a(15) > 5*10^12. - _David A. Corneth_, May 30 2022
%e A354456 a(3) = 132 because 132 - 5^1 = 127, 132 - 5^2 = 107 and 132 - 5^3 = 7 are all prime, and 132 is the least number with this property.
%p A354456 g:= proc(n) local p,x,i;
%p A354456    p:= 1:
%p A354456    do
%p A354456      p:= nextprime(p);
%p A354456      x:= p + 5^n;
%p A354456      if andmap(isprime, [seq(x-5^i,i=1..n-1)]) then return x fi
%p A354456    od
%p A354456 end proc:
%p A354456 map(g, [$1..10]);
%o A354456 (Python)
%o A354456 from sympy import isprime, nextprime
%o A354456 def a(n):
%o A354456     p = 2
%o A354456     while True:
%o A354456         k, p = 5**n + p, nextprime(p)
%o A354456         if all(isprime(k-5**i) for i in range(1, n)):
%o A354456             return k
%o A354456 print([a(n) for n in range(1, 10)]) # _Michael S. Branicky_, May 30 2022
%Y A354456 Cf. A000351, A175222.
%K A354456 nonn,more
%O A354456 1,1
%A A354456 _J. M. Bergot_ and _Robert Israel_, May 30 2022
%E A354456 a(11)-a(14) from _David A. Corneth_, May 30 2022