cp's OEIS Frontend

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.

A376115 Least common differences in the arithmetic progressions corresponding to A376109.

This page as a plain text file.
%I A376115 #6 Sep 11 2024 00:42:51
%S A376115 1,1,1,1,2,2,2,1,3,1,4,4,2,4,1,1,6,6,6,2,6,8,6,8,3,11,7,8,6,2,12,1,12,
%T A376115 12,1,12,6,12,1,4,12,12,12,16,1,12,18,16,14,5,13,22,12,14,17,16,11,12,
%U A376115 6,4,24,24,18,1,7,24,24,24,18,2,12,24,6,35,5,13,19,33,6,8,21,24,12,24,8,24
%N A376115 Least common differences in the arithmetic progressions corresponding to A376109.
%C A376115 a(n) is the least d >= 1 such that A001222(n-i*d) = A001222(n) for 0 <= i < A376109(n).
%H A376115 Robert Israel, <a href="/A376115/b376115.txt">Table of n, a(n) for n = 1..10000</a>
%e A376115 a(7) = 2 because the arithmetic progression 3, 5, 7 of A376109(7) = 3 primes ending in 7 has common difference of 5 - 3 = 7 - 5 = 2.
%e A376115 There are two arithmetic progressions of semiprimes of A376109(14) = 3 ending in 14, namely 6, 10, 14 with common difference 4 and 4, 9, 14 with common difference 5, so a(14) = 4.
%p A376115 M:= Array(1..10):
%p A376115 for n from 2 to 100 do
%p A376115   v:= numtheory:-bigomega(n);
%p A376115   if M[v] = 0 then M[v]:= n else M[v]:= M[v], n fi;
%p A376115 od:
%p A376115 for i from 1 to 10 do M[i]:= [M[i]] od:
%p A376115 f:= proc(s) local n,i,m,d,v,j,dm;
%p A376115    m:= 1; dm:= 1;
%p A376115    v:= numtheory:-bigomega(s);
%p A376115    member(s,M[v],n);
%p A376115    for i from n-1 to 1 by -1 do
%p A376115      d:= s - M[v][i];
%p A376115      if s - m*d < M[v][1] then return dm fi;
%p A376115      for j from 2 while ListTools:-BinarySearch(M[v],s-j*d) <> 0 do od:
%p A376115      if j > m then m:= j; dm:= d fi;
%p A376115    od;
%p A376115   dm;
%p A376115 end proc:
%p A376115 f(1):= 1:
%p A376115 map(f, [$1..100]);
%Y A376115 Cf. A001222, A375386, A375511, A376109.
%K A376115 nonn
%O A376115 1,5
%A A376115 _Robert Israel_, Sep 10 2024