OFFSET
0,3
COMMENTS
This sequence corresponds to the left half of a drawing, the whole drawing being reconstituted by symmetry (see the Illustration link). The divisors of n are closely related to the occurrences of the bit pattern "01 over 10" in the 2 X 2 squares along the (n-1)th and n-th lines (see the pattern link). In particular, n is a prime number if and only if a(n) - a(n-1) = 2^(n-2).
LINKS
FORMULA
a(n) = Sum_{k=1..floor(sqrt(n))} 2^floor(n/k - k).
EXAMPLE
For n = 5, floor(sqrt(n)) = 2. So, two bits are set in a(n); they are the bits number floor(5/1-1)=4 and floor(5/2-2)=0, so a(n) = 10001_2 = 17.
PROG
(PARI)
a(n)=sum(k=1, floor(sqrt(n)), 2^floor(n/k-k))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Luc Rousseau, Feb 02 2023
STATUS
approved