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.

A378884 Numbers that are not powers of primes and whose two smallest prime divisors are consecutive primes.

Original entry on oeis.org

6, 12, 15, 18, 24, 30, 35, 36, 42, 45, 48, 54, 60, 66, 72, 75, 77, 78, 84, 90, 96, 102, 105, 108, 114, 120, 126, 132, 135, 138, 143, 144, 150, 156, 162, 165, 168, 174, 175, 180, 186, 192, 195, 198, 204, 210, 216, 221, 222, 225, 228, 234, 240, 245, 246, 252, 255, 258
Offset: 1

Views

Author

Amiram Eldar, Dec 09 2024

Keywords

Comments

Subsequence of A104210 and first differs from at an n = 15: A104210(15) = 70 = 2 * 5 * 7 is not a term of this sequence.
All the positive multiples of 6 (A008588 \ {0}) are terms.
Numbers k such that nextprime(lpf(k)) = A151800(A020639(k)) | k.
The asymptotic density of this sequence is Sum_{k>=1} (Product_{j=1..k-1} (1-1/prime(j)))/(prime(k)*prime(k+1)) = 0.2178590011934... .

Examples

			12 = 2^2 * 3 is a term since 2 and 3 are consecutive primes.
70 = 2 * 5 * 7 is not a term since 2 and 5 are not consecutive primes.
165 = 3 * 5 * 11 is a term since 3 and 5 are consecutive primes.
		

Crossrefs

Subsequence of A024619, A104210 and A378885.
Subsequences: A006094, A256617.

Programs

  • Mathematica
    q[k_] := Module[{p = FactorInteger[k][[;; , 1]]}, Length[p] > 1 && p[[2]] == NextPrime[p[[1]]]]; Select[Range[300], q]
  • PARI
    is(k) = if(k == 1, 0, my(p = factor(k)[,1]); #p > 1 && p[2] == nextprime(p[1]+1));

A378886 The number of consecutive primes in the prime factorization of n starting from the smallest prime dividing n; a(1) = 0.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 3
Offset: 1

Views

Author

Amiram Eldar, Dec 10 2024

Keywords

Comments

First differs from A300820 at n = 70 = 2 * 5 * 7: A300820(70) = 2 while a(70) = 1.

Examples

			a(42) = 2 since 42 = 2 * 3 * 7 and 2 and 3 are 2 consecutive primes.
a(28) = 1 since 28 = 2^2 * 7 and 3 is not a divisor of 28.
a(4095) = 3 since 4095 = 3^2 * 5 * 7 * 13 and 3, 5 and 7 are 3 consecutive primes.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = FactorInteger[n][[;; , 1]], c = 1, q}, q = p[[1]]; Do[q = NextPrime[q]; If[q == p[[i]], c++, Break[]], {i, 2, Length[p]}]; c]; a[1] = 0; Array[a, 100]
  • PARI
    a(n) = if(n == 1, 0, my(p = factor(n)[,1], c = 1, q); q = p[1]; for(i = 2, #p, q = nextprime(q+1); if(q == p[i], c++, break)); c);

Formula

a(n) >= A276084(n).
a(n) <= A300820(n).
a(n) = A001221(n) if and only if n is in A073491.
a(n) >= 1 for n >= 2.
a(n) >= 2 if and only if n is in A378884.
a(n) >= 3 if and only if n is in A378885.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} k * (d(k) - d(k+1)) = 1.2630925015039..., where d(1) = 1 and d(k) = Sum_{i>=1} (Product_{j=1..i-1} (1-1/prime(j)))/(Product_{j=0..k-1} prime(i+j)), for k >= 2. d(k) is the asymptotic density of numbers m for which a(m) >= k.
Showing 1-2 of 2 results.