|
|
A092338
|
|
a(n) = number of numbers d with n mod d <= 1.
|
|
1
|
|
|
1, 2, 3, 4, 4, 5, 5, 5, 6, 6, 5, 7, 7, 5, 7, 8, 6, 7, 7, 7, 9, 7, 5, 9, 10, 6, 7, 9, 7, 9, 9, 7, 9, 7, 7, 12, 10, 5, 7, 11, 9, 9, 9, 7, 11, 9, 5, 11, 12, 8, 9, 9, 7, 9, 11, 11, 11, 7, 5, 13, 13, 5, 9, 12, 10, 11, 9, 7, 9, 11, 9, 13, 13, 5, 9, 11, 9, 11, 9, 11, 14, 8, 5, 13, 15, 7, 7, 11, 9, 13
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x^2/(x - 1) + ((1 + x)*(log(1 - x) + psi(1, x)))/log(x) where psi(1,x) is the logarithmic derivative of the x-gamma function at z=1. - Olivier Gérard, Jun 24 2012
For n>1, a(n) = Sum_{i=1..n-1} floor(n/i)-floor((n-2)/i). - Wesley Ivan Hurt, Sep 13 2017
|
|
MAPLE
|
with(numtheory): seq(tau(n)+`if`(n>1, tau(n-1)-1, 0), n=1..80); # Ridouane Oudra, Oct 07 2019
|
|
PROG
|
(Haskell)
a092338 n = length $ filter (<= 1) $ map (mod n) [1..n]
(PARI) A006218(n)=sum(k=1, sqrtint(n), n\k)*2-sqrtint(n)^2
(Magma) [#[d:d in [1..n]| n mod d le 1]:n in [1..100]]; // Marius A. Burtea, Oct 07 2019
(Python)
from sympy import divisor_count
def A092338(n): return divisor_count(n)+divisor_count(n-1)-1 if n>1 else 1 # Chai Wah Wu, Oct 24 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|