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 A374846 #15 Jan 05 2025 19:51:42 %S A374846 3,4,6,7,11,14,19,22,23,31,38,43,46,47,59,62,67,71,79,83,86,94,103, %T A374846 107,118,127,131,134,139,142,151,158,163,166,167,179,191,199,206,211, %U A374846 214,223,227,239,251,254,262,263,271,278,283,302,307,311,326,331,334,347,358,359,367,379,382,383,398 %N A374846 Numbers appearing exactly once in a Pythagorean triple. %C A374846 Positions of the ones in A046081. %C A374846 With the exception a(2) = 4, the terms are given by A374845, thus providing a simple formula for the sequence. %H A374846 A. Tripathi, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/46_47-4/Tripathi.pdf">On Pythagorean triples containing a fixed integer</a>, Fib. Q., 46/47 (2008/2009), 331-340. See Theorem 8. %F A374846 p or 2p with p prime and p = 3 mod 4, with 4 added to the sequence, in ascending order. %t A374846 t={}; Do[If[(PrimeQ[n] && Mod[n, 4] == 3) || (PrimeQ[n/2] && Mod [n/2, 4] == 3), t = Join[t, {n}]], {n, 445}]; t = Insert[t, 4, 2] %t A374846 (* Positions of the ones in A046081; based on program by Jean-François Alcover *) %t A374846 a[1] = 0; a[n_] := Module[{f}, f = Select[FactorInteger[n], Mod[#[[1]], 4] == 1 &][[All, 2]]; (DivisorSigma[0, If[OddQ[n], n, n/2]^2] - 1)/2 + (Times @@ (2*f + 1) - 1)/2]; arr = Array[a, 445]; fl = Flatten[Position[arr, 1]] %o A374846 (Python) %o A374846 from itertools import count, islice %o A374846 from sympy import isprime %o A374846 def A374846_gen(startvalue=1): # generator of terms >= startvalue %o A374846 return filter(lambda n:n==4 or (isprime(n) and n&3==3) or (isprime(n>>1) and n&7==6), count(max(startvalue,1))) %o A374846 A374846_list = list(islice(A374846_gen(),20)) # _Chai Wah Wu_, Jul 31 2024 %Y A374846 Cf. A374845, A046081. %K A374846 nonn %O A374846 1,1 %A A374846 _Manfred Boergens_, Jul 22 2024