A095359 Ratio A095109(n)/A095091(n) rounded down.
0, 0, 0, 3, 6, 5, 12, 12, 20, 24, 42, 58, 97, 140, 286, 478, 841, 1504, 2788, 5048
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
isok(m) = {my(s=0); if(m%4==3, for(i=1, m-1, if((s+=kronecker(i, m))<0, return(1)))); 0; } \\ Jinyuan Wang, Jul 20 2020
def is_Motzkin(n, k): s = 0 for i in (1..k) : s += jacobi_symbol(i, n) if s < 0 : return False return True def A095101_list(n): return [m for m in range(3, n+1, 4) if not is_Motzkin(m, m//2)] A095101_list(467) # Peter Luschny, Aug 08 2012
is(m) = {my(s=0); for(i=1, m-1, if((s+=kronecker(i, m))<0, return(0))); 1; } a(n) = {my(c=0); forstep(m=2^n+3-(n==1), 2^(n+1), 4, c+=is(m)); c; } \\ Jinyuan Wang, Jul 20 2020
Comments