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.

A376993 a(n) = A376992(n) - 10^(n-1).

This page as a plain text file.
%I A376993 #19 Oct 14 2024 00:10:44
%S A376993 4,3,13,13,513,801,6781,30721,40513,1057513,515313,16728501,78402181,
%T A376993 13617661,472012281,64846161,5481873013,2459693601,116852093013,
%U A376993 62611784481,1234170737761,1565435686113,17492477581161,2254878102513,16836143444113,229959946206301
%N A376993 a(n) = A376992(n) - 10^(n-1).
%t A376993 a[n_]:=(Module[{k=1}, While[!PrimeQ[m=2k^2+2k+1]||IntegerLength[m]<n, k++]; m]-10^(n-1)); Array[a, 15]
%o A376993 (Python)
%o A376993 from math import isqrt
%o A376993 from itertools import count
%o A376993 from sympy import isprime
%o A376993 def A376993(n):
%o A376993     for k in count(isqrt(((a:=10**(n-1))<<1)-1>>2)):
%o A376993         m = 2*k*(k+1)+1
%o A376993         if m >= a and isprime(m):
%o A376993             return m-a # _Chai Wah Wu_, Oct 13 2024
%Y A376993 Cf. A011557, A376933, A376992.
%K A376993 nonn,base
%O A376993 1,1
%A A376993 _Stefano Spezia_, Oct 11 2024
%E A376993 a(21)-a(26) from _Chai Wah Wu_, Oct 13 2024