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.

A286473 Compound filter (for counting primes of form 4k+1, 4k+2 and 4k+3): a(n) = 4*A032742(n) + (A020639(n) mod 4), a(1) = 1.

This page as a plain text file.
%I A286473 #13 May 12 2017 18:21:19
%S A286473 1,6,7,10,5,14,7,18,15,22,7,26,5,30,23,34,5,38,7,42,31,46,7,50,21,54,
%T A286473 39,58,5,62,7,66,47,70,29,74,5,78,55,82,5,86,7,90,63,94,7,98,31,102,
%U A286473 71,106,5,110,45,114,79,118,7,122,5,126,87,130,53,134,7,138,95,142,7,146,5,150,103,154,47,158,7,162,111,166,7,170,69,174,119,178,5,182,55
%N A286473 Compound filter (for counting primes of form 4k+1, 4k+2 and 4k+3): a(n) = 4*A032742(n) + (A020639(n) mod 4), a(1) = 1.
%C A286473 For all i, j: a(i) = a(j) => A079635(i) = A079635(j). This follows because A079635(n) can be computed by recursively invoking a(n), without needing any other information.
%H A286473 Antti Karttunen, <a href="/A286473/b286473.txt">Table of n, a(n) for n = 1..10000</a>
%F A286473 a(1) = 1, for n > 1, a(n) = 4*A032742(n) + (A020639(n) mod 4).
%t A286473 With[{k = 4}, Table[Function[{p, d}, k d + Mod[p, k] - k Boole[n == 1]] @@ {#, n/#} &@ FactorInteger[n][[1, 1]], {n, 91}]] (* _Michael De Vlieger_, May 12 2017 *)
%o A286473 (Scheme) (define (A286473 n) (if (= 1 n) n (+ (* 4 (A032742 n)) (modulo (A020639 n) 4))))
%o A286473 (Python)
%o A286473 from sympy import divisors, primefactors
%o A286473 def a(n): return 1 if n==1 else 4*divisors(n)[-2] + (min(primefactors(n))%4) # _Indranil Ghosh_, May 12 2017
%Y A286473 Cf. A020639, A032742, A285729, A286472, A286474, A286475, A286476.
%Y A286473 Cf. A001511, A007814, A065339, A079635, A083025 (some of the matched sequences).
%K A286473 nonn
%O A286473 1,2
%A A286473 _Antti Karttunen_, May 11 2017