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.

A353526 The smallest prime not dividing n, reduced modulo 4.

Original entry on oeis.org

2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2
Offset: 1

Views

Author

Antti Karttunen, Apr 24 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = 2}, While[Divisible[n, p], p = NextPrime[p]]; Mod[p, 4]]; Array[a, 100] (* Amiram Eldar, Jul 25 2022 *)
  • PARI
    A053669(n) = forprime(p=2, , if(n%p, return(p))); \\ From A053669
    A353526(n) = (A053669(n)%4);

Formula

a(n) = A010873(A053669(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} ((p mod 4)*(p-1)/(Product_{q prime, q <= p} q)) = 2.2324714414... . - Amiram Eldar, Jul 25 2022