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.

A383652 Primes p preceded and followed by gaps whose product is less than (log(p))^2.

Original entry on oeis.org

17, 19, 41, 43, 59, 61, 71, 73, 101, 103, 107, 109, 137, 139, 149, 151, 163, 167, 179, 181, 191, 193, 197, 199, 227, 229, 233, 239, 241, 269, 271, 277, 281, 283, 311, 313, 347, 349, 353, 379, 383, 397, 401, 419, 421, 431, 433, 439, 443, 457, 461, 463, 487, 491, 499, 503, 521, 523, 563, 569, 571, 593, 599
Offset: 1

Views

Author

Alain Rocchelli, May 04 2025

Keywords

Comments

Since the geometric mean is never greater than the arithmetic mean: A381850 is a subsequence.

Examples

			17 is a term because (17-13)*(19-17)=8 is less than (log(17))^2=8.0271.
19 is a term because (19-17)*(23-19)=8 is less than (log(19))^2=8.6697.
29 is not a term because(29-23)*(31-29)=12 is greater than (log(29))^2=11.3387.
		

Crossrefs

A288907 and A381850 are subsequences.
Cf. A083550.

Programs

  • Mathematica
    Select[Range[2, 110] // Prime, (# - NextPrime[#, -1])(NextPrime[#] - #) < Log[#]^2 &] (* Stefano Spezia, May 04 2025 *)
  • PARI
    forprime(P=3, 600, my(M=P-precprime(P-1), Q=nextprime(P+1)-P, AR=M*Q, AR0=(log(P))^2); if(AR
    				

Formula

Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 0.720268...

A083549 Quotient if least common multiple (lcm) of cototient values of consecutive integers is divided by the greatest common divisor (gcd) of the same pair of consecutive numbers.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 4, 12, 2, 6, 8, 8, 8, 56, 56, 8, 12, 12, 12, 12, 12, 12, 16, 80, 70, 126, 144, 16, 22, 22, 16, 208, 234, 198, 264, 24, 20, 12, 40, 24, 30, 30, 24, 56, 56, 24, 32, 224, 210, 570, 532, 28, 36, 60, 480, 672, 70, 30, 44, 44, 32, 864, 864, 544, 782, 46, 36, 900
Offset: 1

Views

Author

Labos Elemer, May 22 2003

Keywords

Examples

			n=33: cototient(33) = 33-20 = 13, cototient(34) = 34-16 = 18;
lcm(13,18) = 234, gcd(13,18) = 1, so a(34) = 234.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := x-EulerPhi[x]; Table[LCM[f[w+1], f[w]]/GCD[f[w+1], f[w]], {w, 69}]
    (* Second program: *)
    Map[Apply[LCM, #]/Apply[GCD, #] &@ Map[# - EulerPhi@ # &, #] &, Partition[Range[69], 2, 1]] (* Michael De Vlieger, Mar 17 2018 *)

Formula

a(n) = lcm(A051953(n), A051952(n+1))/gcd(A051953(n), A051952(n+1)) = lcm(cototient(n+1), cototient(n))/A049586(n).

A375009 a(n) = smallest prime Q of a consecutive prime triple {P, Q, R} such that floor( (R-Q) * (Q-P) / 8 ) = n.

Original entry on oeis.org

7, 139, 23, 53, 1151, 89, 113, 10007, 509, 331, 91079, 479, 541, 79699, 631, 1129, 293, 211, 5557, 265621, 2633, 1259, 1599709, 3659, 1327, 2127269, 4703, 1847, 1349533, 4201, 7621, 16519, 2579, 41333, 10343761, 4621, 4327, 8039, 16729, 3433, 166209301, 3271, 44351
Offset: 1

Views

Author

Carl R. White, Jul 27 2024

Keywords

Comments

Without taking the floor there is no such Q where (R-Q)*(Q-P)/8 = 2.
Dickson's conjecture implies that if n == 0 or 1 (mod 3) there are infinitely many primes Q such that Q - 2 is the previous prime and Q + 4 n is the next prime, and that if n == 2 (mod 3) there are infinitely many primes Q such that Q - 2 is the previous prime and Q + 4 n + 2 is the next prime. - Robert Israel, Sep 24 2024

Crossrefs

Programs

  • Maple
    N:= 50: # for a(1) .. a(N)
    V:= Vector(N): count:= 0:
    q:= 2: r:= 3:
    while count < N do
      p:= q; q:= r; r:= nextprime(r);
      v:= floor((r-q)*(q-p)/8);
      if v >= 1 and v <= N and V[v] = 0 then
        V[v]:= q; count:= count+1
      fi;
    od:
    convert(V,list); # Robert Israel, Sep 24 2024
  • Mathematica
    With[{p = Prime[Range[10^6]]}, r = (Floor[(#[[3]] - #[[2]])*(#[[2]] - #[[1]])/8]) & /@ Partition[p, 3, 1]; p[[1 + TakeWhile[FirstPosition[r, #] & /@ Range[Max[r]], ! MissingQ[#] &] // Flatten]]] (* Amiram Eldar, Sep 24 2024 *)
  • PARI
    lista(len) = {my(c = 0, v = vector(len), p1 = 2, p2 = 3, i); forprime(p3 = 5, , i = floor((p3-p2)*(p2-p1)/8); if(i > 0 && i <= len && v[i] == 0, c++; v[i] = p2; if(c==len, break)); p1 = p2; p2 = p3); v;} \\ Amiram Eldar, Sep 24 2024
    
  • Python
    from sympy import nextprime
    def A375009(n):
        p,q = 2,3
        while True:
            r = nextprime(q)
            if (r-q)*(q-p)>>3==n:
                return q
            p,q = q,r # Chai Wah Wu, Oct 21 2024
Showing 1-3 of 3 results.