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.

A353497 The smallest prime factor of n, reduced modulo 4, with a(1) = 1.

This page as a plain text file.
%I A353497 #15 Apr 27 2022 13:55:02
%S A353497 1,2,3,2,1,2,3,2,3,2,3,2,1,2,3,2,1,2,3,2,3,2,3,2,1,2,3,2,1,2,3,2,3,2,
%T A353497 1,2,1,2,3,2,1,2,3,2,3,2,3,2,3,2,3,2,1,2,1,2,3,2,3,2,1,2,3,2,1,2,3,2,
%U A353497 3,2,3,2,1,2,3,2,3,2,3,2,3,2,3,2,1,2,3,2,1,2,3,2,3,2,1,2,1,2,3,2,1,2,3,2,3
%N A353497 The smallest prime factor of n, reduced modulo 4, with a(1) = 1.
%H A353497 Antti Karttunen, <a href="/A353497/b353497.txt">Table of n, a(n) for n = 1..65537</a>
%F A353497 a(n) = A010873(A020639(n)).
%F A353497 For all n >= 1, A010873(n) = A010873(A353490(n)*a(n)).
%F A353497 For all n >= 1, a(2n-1) = A010873(A353490(2n-1)*(2n-1)).
%F A353497 For all n >= 1, a(A276086(n)) = A353526(n).
%t A353497 a[n_] := Mod[FactorInteger[n][[1, 1]], 4]; Array[a, 100] (* _Amiram Eldar_, Apr 26 2022 *)
%o A353497 (PARI)
%o A353497 A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
%o A353497 A353497(n) = (A020639(n)%4);
%o A353497 (Python)
%o A353497 from sympy import factorint
%o A353497 def a(n): return 1 if n==1 else (2 if n%2==0 else min(factorint(n))%4)
%o A353497 print([a(n) for n in range(1, 106)]) # _Michael S. Branicky_, Apr 26 2022
%Y A353497 Cf. A010873, A020639, A353490, A353526.
%Y A353497 Cf. also A353493.
%K A353497 nonn
%O A353497 1,2
%A A353497 _Antti Karttunen_, Apr 26 2022