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

A377320 a(n) is the smallest positive integer k such that n + k and n - k have the same number of prime factors.

Original entry on oeis.org

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

Views

Author

Felix Huber, Nov 17 2024

Keywords

Comments

If the strong Goldbach conjecture is true, that every even number >= 8 is the sum of two distinct primes, then a positive integer k <= A082467(n) exists for n >= 4.

Examples

			a(7) = 3 because 10 and 4 have both two prime factors. 8 and 6 or 9 and 7 respectively have a different number of prime factors.
		

Crossrefs

Programs

  • Maple
    A377320:=proc(n)
       local k;
       for k to n-1 do
          if NumberTheory:-Omega(n+k)=NumberTheory:-Omega(n-k) then
             return k
          fi
       od;
    end proc;
    seq(A377320(n),n=4..90);
  • Mathematica
    A377320[n_] := Module[{k = 0}, While[PrimeOmega[++k + n] != PrimeOmega[n - k]]; k];
    Array[A377320, 100, 4] (* Paolo Xausa, Dec 02 2024 *)
  • PARI
    a(n) = my(k=1); while (bigomega(n+k) != bigomega(n-k), k++); k; \\ Michel Marcus, Nov 17 2024

Formula

1 <= a(n) <= A082467(n).

A188348 Distance between n and the next number with the same number of distinct prime factors.

Original entry on oeis.org

1, 1, 1, 2, 4, 1, 1, 2, 2, 2, 2, 3, 1, 3, 1, 2, 2, 4, 1, 1, 2, 2, 2, 2, 2, 2, 5, 2, 12, 1, 5, 1, 1, 1, 2, 4, 1, 1, 4, 2, 18, 4, 1, 1, 2, 2, 2, 4, 1, 1, 2, 6, 1, 1, 1, 1, 4, 2, 6, 3, 1, 2, 3, 3, 4, 4, 1, 3, 8, 2, 2, 6, 1, 1, 1, 3, 6, 2, 2, 2, 3, 6, 6, 1, 1, 1, 3, 8, 12
Offset: 2

Views

Author

Juri-Stepan Gerasimov, Mar 28 2011

Keywords

Crossrefs

Programs

  • Maple
    N:= 200: # to use numbers up to N
    V:= Array(2..N, n -> nops(numtheory:-factorset(n))):
    A:= Array(2..N):
    for n from 2 to N do
      v:= V[n];
      if assigned(Last[v]) then
         A[Last[v]]:= n-Last[v]
      fi;
      Last[v]:= n;
    od:
    m:= min(select(t -> A[t]=0, [$2..N]))-1:
    seq(A[i],i=2..m); # Robert Israel, Jan 24 2020
  • PARI
    for(n=2, 100, f=omega(n); m=n+1; while(omega(m)!=f, m++); print1(m-n, ", ")) \\ Colin Barker, Jun 27 2014

Formula

{min d>0: A001221(n+d) = A001221(n)}.

Extensions

Renamed, edited and checked by R. J. Mathar, Mar 28 2011.
Showing 1-2 of 2 results.