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.

A373887 a(n) is the length of the longest arithmetic progression of semiprimes ending in the n-th semiprime.

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 2, 4, 3, 3, 4, 3, 5, 3, 3, 4, 3, 3, 4, 3, 4, 5, 4, 4, 3, 3, 5, 3, 4, 4, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 5, 3, 3, 4, 5, 4, 4, 3, 4, 3, 4, 4, 4, 4, 3, 4, 5, 4, 4, 3, 4, 4, 4, 5, 3, 5, 6, 4, 4, 4, 4, 4, 4, 5, 4, 5, 5, 3, 3, 4, 4, 5, 5, 4, 4, 4, 4, 4, 5, 4, 5
Offset: 1

Views

Author

Robert Israel, Aug 10 2024

Keywords

Comments

a(n) is the greatest k such that there exists d > 0 such that A001358(n) - j*d is in A001358 for j = 0 .. k-1.
The first appearance of m in this sequence is at n where A001358(n) = A096003(m).
Conjectures: a(n) >= 3 for n >= 16.
Limit_{n -> oo} a(n) = oo.
If A001358(n) is divisible by A000040(m), then a(n) >= A373888(m). In particular, the conjectures above are implied by the corresponding conjectures for A373888. - Robert Israel, Aug 19 2024

Examples

			a(5) = 3 because the 5th semiprime is A001358(5) = 14 and there is an arithmetic progression of 3 semiprimes ending in 14, namely 4, 9, 14, and no such arithmetic progression of 4 semiprimes.
		

Crossrefs

Programs

  • Maple
    S:= select(t -> numtheory:-bigomega(t)=2, [$1..10^5]):
    f:= proc(n) local s,i,m,d,j;
      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 m fi;
        for j from 2 while ListTools:-BinarySearch(S,s-j*d) <> 0 do od;
        m:= max(m, j);
      od;
    m;
    end proc:
    map(f, [$1..100]);

A375386 a(n) is the common difference in the longest arithmetic progression of primes ending in prime(n). If there is more than one such arithmetic progression, the smallest difference is chosen.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 6, 6, 6, 12, 6, 12, 12, 18, 12, 6, 24, 24, 12, 6, 6, 12, 18, 18, 30, 30, 18, 6, 30, 30, 30, 24, 36, 48, 24, 30, 12, 18, 42, 6, 54, 54, 42, 48, 60, 30, 42, 30, 66, 42, 66, 30, 60, 30, 12, 6, 30, 48, 84, 60, 60, 78, 60, 102, 60, 60, 30, 78, 36, 60, 90, 18, 90, 6, 72, 96, 30, 54
Offset: 2

Views

Author

Robert Israel, Aug 13 2024

Keywords

Comments

a(n) is the smallest common difference in an arithmetic progression of A373888(n) primes ending in prime(n).
a(n) is divisible by all primes < min(A373888(n) + 1, prime(n) - (A373888(n)-1)*a(n)).

Examples

			a(4) = 2 because the 4th prime is 7 and the arithmetic progression of 3 primes ending in 7, namely 3, 5, 7, has common difference 2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local s, i, m, dd, d, j;
      m:= 1;
      s:= ithprime(n);
      for i from n-1 to 1 by -1 do
        d:= s - ithprime(i);
        if s - m*d < 2 then return dd fi;
        for j from 2 while isprime(s-j*d) do od;
        if j > m then m:= j; dd:= d fi;
      od;
      dd
    end proc:
    map(f, [$2..100]);

A376109 a(n) is the length of the longest arithmetic progression ending at n consisting of numbers with the same number of prime factors as n, counted with multiplicity.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 2, 3, 2, 1, 3, 2, 3, 2, 3, 3, 4, 2, 2, 3, 2, 3, 5, 2, 3, 1, 3, 3, 3, 2, 2, 3, 2, 2, 4, 3, 4, 3, 2, 4, 3, 2, 3, 2, 3, 3, 5, 2, 4, 3, 3, 5, 4, 2, 3, 3, 3, 1, 3, 3, 3, 3, 4, 3, 3, 2, 3, 3, 2, 3, 3, 3, 4, 2, 2, 4, 4, 3, 3, 4, 5, 3, 3, 2, 4, 4, 4, 3, 3, 2, 4, 3, 3
Offset: 1

Views

Author

Robert Israel, Sep 10 2024

Keywords

Comments

a(n) is the greatest k such that there exists d >= 1 with A001222(n-i*d) = A001222(n) for 0 <= i < k.
If m divides n, then a(n) >= a(m).
a(n) = 1 if and only if n is a power of 2.

Examples

			a(7) = 3 because 7 is prime and there is an arithmetic progression of 3 primes, namely 3, 5, 7, ending with 7 but no such arithmetic progression of 4 primes.
		

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;
       m:= 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 m fi;
         for j from 2 while ListTools:-BinarySearch(M[v],s-j*d) <> 0 do od:
         m:= max(m,j);
       od;
      m;
    end proc:
    f(1):= 1:
    map(f, [$1..100]);
Showing 1-3 of 3 results.