The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A351362 Number of ways the numbers from 1..n do not divide the numbers from n..2n-1. 1
0, 1, 4, 8, 14, 22, 32, 42, 57, 72, 88, 108, 129, 151, 177, 203, 232, 262, 295, 329, 367, 405, 443, 487, 532, 577, 627, 675, 727, 783, 839, 895, 956, 1018, 1082, 1148, 1217, 1285, 1357, 1431, 1506, 1586, 1664, 1746, 1832, 1914, 2002, 2092, 2186, 2277, 2374, 2472, 2568, 2672 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = Sum_{k=1..n} Sum_{i=n..2n-1} sign(i mod k).
a(n) = n*(n+1) - 1 + A006218(n-1) - A006218(2n-1). - Chai Wah Wu, Feb 08 2022
EXAMPLE
a(5) = 14; there are 14 ways that the numbers 1..5 do not divide the numbers 5..9. 2 does not divide 5,7,9 (3 ways) + 3 does not divide 5,7,8 (3 ways) + 4 does not divide 5,6,7,9 (4 ways) + 5 does not divide 6,7,8,9 (4 ways) = 14 ways.
PROG
(Python)
def A351362(n): return 1 if n == 2 else n*n-1-sum((2*n-1)//k for k in range(2, 2*n-1))+sum((n-1)//k for k in range(2, n-1)) # Chai Wah Wu, Feb 08 2022
(Python)
from math import isqrt
def A351362(n): return ((t:=isqrt(m:=(n<<1)-1))+(s:=isqrt(r:=n-1)))*(t-s)+(sum(r//k for k in range(1, s+1))-sum(m//k for k in range(1, t+1))<<1)+n*(n+1)-1 # Chai Wah Wu, Oct 23 2023
CROSSREFS
Sequence in context: A024398 A054347 A194149 * A003682 A333700 A011897
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Feb 08 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 12:18 EDT 2024. Contains 372533 sequences. (Running on oeis4.)