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-3 of 3 results.

A375422 a(n) is the maximum number of points from the set {(k, prime(k)), k = 1..n} belonging to a straight line passing through the point (n, prime(n)) (where prime(k) denotes the k-th prime number).

Original entry on oeis.org

1, 2, 2, 3, 2, 2, 3, 3, 4, 3, 3, 4, 5, 4, 5, 6, 3, 7, 4, 5, 8, 6, 7, 3, 3, 3, 4, 4, 3, 4, 4, 4, 5, 3, 4, 5, 6, 5, 7, 4, 4, 6, 5, 5, 8, 4, 5, 6, 6, 4, 4, 4, 5, 4, 5, 6, 7, 5, 4, 5, 4, 5, 5, 8, 5, 4, 6, 7, 7, 8, 9, 10, 9, 10, 11, 11, 12, 12, 13, 13, 8, 14, 9, 15
Offset: 1

Views

Author

Rémy Sigrist, Aug 14 2024

Keywords

Comments

Is this sequence unbounded?

Examples

			The first terms, alongside an appropriate set of points, are:
  n   a(n)  Points
  --  ----  --------------------------------------------------
   1     1  (1,2)
   2     2  (1,2), (2,3)
   3     2  (1,2), (3,5)
   4     3  (2,3), (3,5), (4,7)
   5     2  (1,2), (5,11)
   6     2  (1,2), (6,13)
   7     3  (3,5), (5,11), (7,17)
   8     3  (2,3), (5,11), (8,19)
   9     4  (3,5), (5,11), (7,17), (9,23)
  10     3  (6,13), (7,17), (10,29)
  11     3  (8,19), (9,23), (11,31)
  12     4  (6,13), (7,17), (10,29), (12,37)
  13     5  (6,13), (7,17), (10,29), (12,37), (13,41)
  14     4  (8,19), (9,23), (11,31), (14,43)
  15     5  (8,19), (9,23), (11,31), (14,43), (15,47)
  16     6  (6,13), (7,17), (10,29), (12,37), (13,41), (16,53)
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

A375511 a(n) is the common difference in the longest arithmetic progression of semiprimes ending in the n-th semiprime. If there is more than one such arithmetic progression, the smallest difference is chosen.

Original entry on oeis.org

2, 3, 1, 4, 1, 6, 8, 3, 11, 12, 12, 1, 12, 1, 12, 14, 13, 17, 11, 12, 24, 7, 18, 35, 19, 24, 8, 24, 18, 29, 8, 36, 1, 24, 17, 30, 12, 4, 3, 48, 4, 36, 11, 48, 23, 24, 1, 30, 12, 13, 12, 36, 42, 24, 14, 16, 36, 14, 8, 32, 36, 7, 60, 42, 60, 60, 3, 4, 36, 46, 4, 12, 32, 4, 60, 16, 18, 44, 36, 16
Offset: 2

Views

Author

Robert Israel, Aug 18 2024

Keywords

Comments

a(n) is the smallest common difference in an arithmetic progression of A373887(n) semiprimes ending in A001358(n).

Examples

			The 5th semiprime is 14, A373887(5) = 3, and there are two arithmetic progressions of semiprimes of length 3 ending in 14, namely 6, 10, 14 with common difference 4 and 4, 9, 14 with common difference 5.  Therefore a(5) = min(4, 5) = 4.
		

Crossrefs

Programs

  • Maple
    S:= select(t -> numtheory:-bigomega(t)=2, [$1..10^5]):
    f:= proc(n) local s, i, m, d, j, dm;
      m:= 1;
      s:= S[n];
      for i from n-1 to 1 by -1 do
        d:= s - S[i];
        if s - m*d < 4 then return dm fi;
        for j from 2 while ListTools:-BinarySearch(S, s-j*d) <> 0 do od;
        if j > m then m:= j; dm:= d fi;
      od;
    dm;
    end proc:
    map(f, [$2..200]);

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-3 of 3 results.