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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Robert Israel, Sep 10 2024

Keywords

Comments

a(n) is the least d >= 1 such that A001222(n-i*d) = A001222(n) for 0 <= i < A376109(n).

Examples

			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.
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.
		

Crossrefs

Programs

  • Maple
    M:= Array(1..10):
    for n from 2 to 100 do
      v:= numtheory:-bigomega(n);
      if M[v] = 0 then M[v]:= n else M[v]:= M[v], n fi;
    od:
    for i from 1 to 10 do M[i]:= [M[i]] od:
    f:= proc(s) local n,i,m,d,v,j,dm;
       m:= 1; dm:= 1;
       v:= numtheory:-bigomega(s);
       member(s,M[v],n);
       for i from n-1 to 1 by -1 do
         d:= s - M[v][i];
         if s - m*d < M[v][1] then return dm fi;
         for j from 2 while ListTools:-BinarySearch(M[v],s-j*d) <> 0 do od:
         if j > m then m:= j; dm:= d fi;
       od;
      dm;
    end proc:
    f(1):= 1:
    map(f, [$1..100]);
Showing 1-1 of 1 results.