A129574 Number of odd divisors of n plus the number of odd divisors of n - 1.
1, 2, 3, 3, 3, 4, 4, 3, 4, 5, 4, 4, 4, 4, 6, 5, 3, 5, 5, 4, 6, 6, 4, 4, 5, 5, 6, 6, 4, 6, 6, 3, 5, 6, 6, 7, 5, 4, 6, 6, 4, 6, 6, 4, 8, 8, 4, 4, 5, 6, 7, 6, 4, 6, 8, 6, 6, 6, 4, 6, 6, 4, 8, 7, 5, 8, 6, 4, 6, 8, 6, 5, 5, 4, 8, 8, 6, 8, 6, 4, 7, 7, 4, 6, 8, 6, 6, 6, 4, 8
Offset: 1
Keywords
Examples
a(4) = 3 = sum of row 4 of triangle A129573: (1 + 0 + 1 + 1).
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Join[{1},Table[Total[Mod[Divisors[n],2]]+Total[Mod[Divisors[n-1],2]],{n,2,90}]] (* James C. McMahon, Jan 31 2025 *)
-
PARI
a(n)=numdiv(n >> valuation(n,2)) + if(n > 1, numdiv((n-1) >> valuation(n-1,2))) \\ Andrew Howroyd, Aug 10 2018
Formula
Extensions
Name changed and terms a(11) and beyond from Andrew Howroyd, Aug 10 2018
Comments