|
|
A132106
|
|
a(n) = 1 + floor(sqrt(n)) + Sum_{i=1..n} floor(n/i).
|
|
1
|
|
|
1, 3, 5, 7, 11, 13, 17, 19, 23, 27, 31, 33, 39, 41, 45, 49, 55, 57, 63, 65, 71, 75, 79, 81, 89, 93, 97, 101, 107, 109, 117, 119, 125, 129, 133, 137, 147, 149, 153, 157, 165, 167, 175, 177, 183, 189, 193, 195, 205, 209, 215, 219, 225, 227, 235, 239, 247, 251, 255, 257, 269
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Matches first 8 odd primes.
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(PARI) a(n) = 1 + sqrtint(n) + sum(i=1, n, n\i); \\ Michel Marcus, Jun 17 2021
(Python)
from math import isqrt
def A132106(n): return (lambda m: 2*(sum(n//k for k in range(1, m+1)))+m*(1-m)+1)(isqrt(n)) # Chai Wah Wu, Oct 08 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Richard C. Schroeppel, Oct 31 2007
|
|
STATUS
|
approved
|
|
|
|