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.

A128428 Number of distinct prime factors of n^2+1.

Original entry on oeis.org

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

Views

Author

Kent Horvath (kenthorvath(AT)gmail.com), May 10 2007

Keywords

Comments

a(n) is also the number of distinct prime factors, up to multiplication by units, of n + i in the ring of Gaussian integers. - Jason Kimberley, Dec 17 2011

Examples

			a(3) = 2 because 3^2+1 = 2*5.
		

Crossrefs

Cf. A193330 (counted with multiplicity).

Programs

  • Maple
    a:= n-> nops(select(isprime, numtheory[divisors](n^2+1))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 06 2020
  • Mathematica
    a[n_]:=Length[FactorInteger[n^2 + 1]]
  • PARI
    a(n)=omega(n^2+1) \\ Charles R Greathouse IV, Jul 31 2011

Formula

a(n) = A001221(n^2+1).