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.

A193432 Number of divisors of n^2 + 1.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 6, 4, 4, 2, 4, 4, 8, 2, 4, 2, 8, 6, 4, 2, 8, 4, 8, 2, 4, 2, 8, 4, 4, 4, 8, 6, 8, 4, 4, 2, 8, 6, 4, 2, 6, 4, 12, 4, 4, 4, 16, 4, 4, 4, 4, 4, 8, 2, 8, 2, 16, 4, 4, 4, 4, 4, 8, 4, 4, 2, 8, 8, 4, 6, 4, 8, 16, 2, 8, 4, 8, 4, 4, 4, 8, 6, 16, 2
Offset: 0

Views

Author

Michel Lagneau, Jul 28 2011

Keywords

Examples

			a(7) = 6 because 7^2 + 1 = 50 and the 6 divisors are {1, 2, 5, 10, 25, 50}.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 0 to 110 do:n1:=nops(divisors(n^2+1)):s:=0:for m from 1 to n1 do: s:=s+1:od: printf(`%d, `, s):od:
  • Mathematica
    Array[DivisorSigma[0, #^2 + 1] &, 85, 0] (* Michael De Vlieger, Mar 17 2018 *)
  • PARI
    a(n) = numdiv(n^2+1); \\ Michel Marcus, Mar 16 2018
    
  • Python
    from sympy import divisor_count
    def A193432(n): return divisor_count(n**2+1) # Chai Wah Wu, Apr 17 2025

Formula

a(n) = A000005(A002522(n)). - Michel Marcus, Mar 16 2018