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.
%I A295996 #30 Feb 16 2025 08:33:52 %S A295996 0,3,4,6,8,8,8,10,10,12,14,14,15,17,17,19,19,19,21,21,21,21,23,23,25, %T A295996 27,27,29,31,31,32,32,32,32,34,34,34,36,36,38,38,38,38,40,40,42,42,42, %U A295996 44,46,46,46,46,46,46,46,46,48,50,50,52,52,52,52,54,54,54,56 %N A295996 One quarter of number of Gaussian primes whose norm is 4*n+1 or less. %H A295996 Seiichi Manyama, <a href="/A295996/b295996.txt">Table of n, a(n) for n = 0..10000</a> %H A295996 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GaussianPrime.html">Gaussian Prime</a> %e A295996 The Gaussian primes whose norm is 9 or less; %e A295996 * 3i, %e A295996 * * -1+2i, 1+2i %e A295996 * * * * -2+i, -1+i, 1+i, 2+i %e A295996 * * -3, 3 %e A295996 * * * * -2-i, -1-i, 1-i, 2-i %e A295996 * * -1-2i, 1-2i %e A295996 * -3i %e A295996 a(2) = 16/4 = 4. %o A295996 (Ruby) %o A295996 require 'prime' %o A295996 def A(k, n) %o A295996 ary = [] %o A295996 cnt = 0 %o A295996 k.step(4 * n + k, 4){|i| %o A295996 cnt += 1 if i.prime? %o A295996 ary << cnt %o A295996 } %o A295996 ary %o A295996 end %o A295996 def A295996(n) %o A295996 ary1 = A(1, n) %o A295996 ary3 = A(3, Math.sqrt(n).to_i) + [0] %o A295996 [0] + (1..n).map{|i| 1 + 2 * ary1[i] + ary3[(Math.sqrt(4 * i + 1).to_i - 3) / 4]} %o A295996 end %o A295996 p A295996(100) %Y A295996 Cf. A016813, A055029, A091100, A091134, A135462, A296020, A296021. %K A295996 nonn %O A295996 0,2 %A A295996 _Seiichi Manyama_, Dec 02 2017