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 A118917 #10 Aug 30 2017 15:16:30 %S A118917 0,0,1,0,0,0,0,2,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,2,0,1,0,0,0,0,0,2,0,0, %T A118917 0,0,0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, %U A118917 0,0,0,2,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,2,0 %N A118917 Number of inequivalent primes in ring of integers Z[sqrt(2)] with absolute value of norm = n. %C A118917 Since there are infinitely many units in Z[sqrt(2)], the total number of primes with a given norm is infinite (when there are any). %H A118917 Antti Karttunen, <a href="/A118917/b118917.txt">Table of n, a(n) for n = 0..65537</a> %F A118917 a(n) = 2 if n is a prime = 1,7 (mod 8); a(n) = 1 if n is 2 or p^2 where p is a prime = 3,5 (mod 8); otherwise a(n) = 0. %t A118917 a[n_] := Which[PrimeQ[n] && MatchQ[Mod[n, 8], 1|7], 2, p = Sqrt[n]; n == 2 || IntegerQ[p] && PrimeQ[p] && MatchQ[Mod[p, 8], 3|5], 1, True, 0]; Table[a[n], {n, 0, 104}] (* _Jean-François Alcover_, Nov 22 2016 *) %o A118917 (PARI) A118917(n) = { my(p); if(isprime(n)&&((1==(n%8))||(7==(n%8))), 2, if((2==n)||((issquare(n,&p)&&isprime(p))&&((3==(p%8))||(5==(p%8)))),1,0)); }; \\ _Antti Karttunen_, Aug 30 2017 %Y A118917 Cf. A055029, A118916. %K A118917 easy,nice,nonn %O A118917 0,8 %A A118917 _Franklin T. Adams-Watters_, May 05 2006