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.

A328026 Number of divisible pairs of consecutive divisors of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 03 2019

Keywords

Comments

The number m = 2^n, n >= 0, is the smallest for which a(m) = n. - Marius A. Burtea, Nov 20 2019

Examples

			The divisors of 500 are {1,2,4,5,10,20,25,50,100,125,250,500}, with consecutive divisible pairs {1,2}, {2,4}, {5,10}, {10,20}, {25,50}, {50,100}, {125,250}, {250,500}, so a(500) = 8.
		

Crossrefs

Positions of 1's are A000040.
Positions of 0's and 2's are A328028.
Positions of terms > 2 are A328189.
Successive pairs of consecutive divisors are counted by A129308.

Programs

  • Magma
    f:=func;  g:=func; [g(n):n in [1..100]]; // Marius A. Burtea, Nov 20 2019
  • Mathematica
    Table[Length[Split[Divisors[n],!Divisible[#2,#1]&]]-1,{n,100}]
  • PARI
    a(n) = {my(d=divisors(n), nb=0); for (i=2, #d, if ((d[i] % d[i-1]) == 0, nb++)); nb;} \\ Michel Marcus, Oct 05 2019
    

Formula

a(p^k) = k for any prime number p and k >= 0. - Rémy Sigrist, Oct 05 2019

Extensions

Data section extended up to a(105) by Antti Karttunen, Feb 23 2023