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.

A384195 a(n) = tau(n+1) - tau(n-1), where tau(n) = A000005(n), the number of divisors of n.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, -1, 2, 0, -2, 2, 1, -2, 1, 0, 0, 2, -2, -2, 4, 1, -4, 1, 2, -2, 2, 0, -2, 2, -2, 0, 5, -2, -5, 2, 4, -2, 0, 0, -2, 4, -2, -4, 6, 1, -4, 1, 0, -2, 2, 2, 0, 0, -4, -2, 8, 0, -8, 4, 3, -2, 1, -2, -2, 2, 2, -2, 4, 0, -8, 4, 2, -2, 2, -2, 2, 3, -6, -3, 8, 2, -8
Offset: 2

Views

Author

Dan Dart, May 21 2025

Keywords

Comments

Conjecture: a(n)=0 for an infinite number of values.

Examples

			a(10) = tau(11) - tau(9) = 2 - 3 = -1.
		

Crossrefs

Programs

  • Haskell
    divides ∷ (Integral a) ⇒ a → a → Bool
    divides a b = b `mod` a == 0
    properFactors ∷ Integral a ⇒ a → [a]
    properFactors n = 1 : filter (`divides` n) [2..(n `div` 2)]
    factors ∷ Integral a ⇒ a → [a]
    factors 1 = [1]
    factors n = properFactors n <> [n]
    tauSuccMinusTauPred :: Integer -> Integer
    tauSuccMinusTauPred n = fromIntegral (length (factors (n + 1))) - fromIntegral (length (factors (n - 1)))
    
  • PARI
    a(n) = numdiv(n+1) - numdiv(n-1); \\ Michel Marcus, May 21 2025

Formula

a(n) = tau(n+1) - tau(n-1).