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.

Previous Showing 31-40 of 67 results. Next

A356322 a(n) is the smallest number that starts a run of exactly n consecutive numbers in A126706, or -1 if no such number exists.

Original entry on oeis.org

12, 44, 98, 3174, 844, 22020, 217070, 1092747, 8870024, 262315467, 221167422, 47255689915, 82462576220, 1043460553364, 79180770078548
Offset: 1

Views

Author

Michael De Vlieger, Oct 28 2022

Keywords

Comments

Term a(n) begins a run of n consecutive nonsquarefree numbers m such that omega(m) > 1.
The run of m must occur between successive primes.

Examples

			a(n) is the first term in the sequences shown below:
n: a(n)..a(n)+n-1
-----------------
1: {12}
2: {44, 45}
3: {98, 99, 100}
4: {3174, 3175, 3176, 3177}
5: {844, 845, 846, 847, 848}
6: {22020, 22021, 22022, 22023, 22024, 22025}
7: {217070, 217071, 217072, 217073, 217074, 217075, 217076}
...
There are 4 consecutive numbers m in A126706 starting from 844 and again from 2888, but since 848 and 2892, respectively, are also in A126706, these m ascribe to n = 5 instead. The range m = 3174..3177 has at most n = 4 numbers in A126706 and 3174 is the smallest number with that quality, hence a(4) = 3174.
		

Crossrefs

Programs

  • C
    // See Links section.
  • Mathematica
    j = 0; k[_] = False; Sort[Reap[Do[If[And[#2 > 1, #1 != #2] & @@ {PrimeOmega[n], PrimeNu[n]}, j++; If[! IntegerQ[c], Set[c, n]], If[j > 0, If[! k[j], Sow[{j, c}] ]; Set[{k[j], j}, {True, 0}]; Clear[c] ] ], {n, 2^16}] ][[-1, -1]] ][[All, -1]]

Extensions

a(10)-a(11) from Rémy Sigrist, Oct 29 2022
a(12)-a(14) from Martin Ehrenstein, Oct 30 2022
a(15) from Martin Ehrenstein, Nov 02 2022

A065386 Successive record values of the cototient function (A051953).

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 12, 16, 22, 24, 30, 32, 36, 44, 46, 48, 54, 60, 66, 70, 72, 78, 88, 90, 92, 94, 96, 110, 120, 132, 138, 140, 162, 176, 180, 184, 198, 210, 220, 250, 264, 270, 294, 324, 330, 342, 352, 360, 382, 396, 402, 426, 440, 486, 500, 514, 522, 528, 550, 588
Offset: 1

Views

Author

Labos Elemer, Nov 05 2001

Keywords

Examples

			a(8)=22 because for m = 1...29 the cototient values are all smaller than cototient(30)=22, where 30=A065385(8) and 22 is the 8th term in the sequence of such local records.
		

Crossrefs

Cototient(A065385(n)).
A006093 gives similar records for the totient function. A002093, A002182, A015702, A005250 are analogous sequences for other functions.
a(n) = A051953(A065385(n)).

Programs

  • Mathematica
    a=0; s=0; Do[s = n-EulerPhi[n]; If[s>a, a=s; Print[s]], {n, 1, 10000}]
    (* Second program: *)
    With[{s = Array[# - EulerPhi@ # &, 10^3]}, Union@ FoldList[Max, s]] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    r=-1; for(n=1,1000,d=n-eulerphi(n); if(r
    				
  • PARI
    { n=0; x=-1; for (m=1, 10^9, c=m - eulerphi(m); if (c > x, x=c; write("b065386.txt", n++, " ", c); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 17 2009

A087102 Number of numbers occurring most frequently as difference between consecutive primes <= prime(n).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 10 2003

Keywords

Comments

For small n: a(n)<=3; A087103(n) and A087104(n) give the smallest and greatest jumping champion(s) for prime(n).

Crossrefs

Programs

  • Mathematica
    d=Table[0, {100}]; p=2; Table[q=NextPrime[p]; d[[q-p]]++; p=q; Length[Position[d, Max[d]]], {1000}]

A132470 Smallest number at distance exactly 3n from nearest prime.

Original entry on oeis.org

2, 26, 119, 532, 1339, 1342, 9569, 15704, 19633, 31424, 31427, 31430, 31433, 155960, 155963, 360698, 360701, 370312, 370315, 492170, 1357261, 1357264, 1357267, 2010802, 2010805, 4652428, 17051785, 17051788, 17051791, 17051794, 17051797, 20831416, 20831419, 20831422
Offset: 0

Views

Author

Jonathan Vos Post, Sep 03 2007

Keywords

Comments

Let f(m)= A051699(m) = exact distance from m to its closest prime (including m itself). Then a(n) = min { m : f(m) = 3n}. - R. J. Mathar, Nov 18 2007
This sequence can be derived from the record prime gap sequences A002386 and A005250. In particular, for n > 0, a(n) = A002386(k) + 3*n where k is the least index such that A005250(k) >= 3*n. - Andrew Howroyd, Jan 04 2020

Examples

			a(3)=532 where 532+3*3 is prime and all numbers below 532 have a distance smaller or larger than 3n=9 to their nearest primes and there is no prime within a distance of 8 to 532.
		

Crossrefs

Programs

  • Maple
    A051699 := proc(m) if isprime(m) then 0 ; elif m <= 2 then op(m+1,[2,1]) ; else min(nextprime(m)-m,m-prevprime(m)) ; fi ; end: A132470 := proc(n) local m ; if n = 0 then RETURN(2); else for m from 0 do if A051699(m) = 3 * n then RETURN(m) ; fi ; od: fi ; end: seq(A132470(n),n=0..18) ; # R. J. Mathar, Nov 18 2007
  • Mathematica
    terms = 34;
    gaps = Cases[Import["https://oeis.org/A002386/b002386.txt", "Table"], {, }][[;; terms, 2]];
    w[n_] := (NextPrime[gaps[[n]] + 1] - gaps[[n]])/6 // Floor;
    k = 1; a[0] = 2;
    For[n = 1, n <= terms, n++, While[w[k] < n, k++]; a[n] = gaps[[k]] + 3n];
    a /@ Range[0, terms-1] (* Jean-François Alcover, Apr 09 2020, after Andrew Howroyd *)
  • PARI
    \\ here R(gaps) wants prefix of A002386 as vector.
    aA002386(lim)={my(L=List(),q=2,g=0); forprime(p=3, lim, if(p-q>g, listput(L,q); g=p-q); q=p); Vec(L)}
    R(gaps)={my(w=vector(#gaps, n, nextprime(gaps[n]+1) - gaps[n])\6, r=vector(w[#w]+1), k=1); r[1]=2; for(n=1, w[#w], while(w[k]A002386(10^7))} \\ Andrew Howroyd, Jan 04 2020

Formula

a(n) = min {m : A051699(m) = 3n}. - R. J. Mathar, Nov 18 2007

Extensions

Corrected by Dean Hickerson, Sep 05 2007
Both this sequence and A051728 should be checked. There are two possibilities for confusion in each case. In defining f(m), does one allow or exclude m itself, in case m is a prime? In defining a(n), does one require (here) that f(m) = 3n or only that >= 3n, or (in A051728) that f(m) = 2n or only >= 2n? Probably there should be several sequences, to include all the possibilities in each case. - N. J. A. Sloane, Nov 18 2007. Added Nov 20 2007: R. J. Mathar has now clarified the definition of the present sequence.
Corrected and extended by R. J. Mathar, Nov 18 2007
Terms a(19) and beyond from Andrew Howroyd, Jan 04 2020

A185439 Emirp gaps: Differences between consecutive emirps.

Original entry on oeis.org

4, 14, 6, 34, 2, 6, 18, 10, 6, 36, 8, 10, 12, 20, 112, 26, 10, 12, 30, 312, 8, 24, 6, 4, 8, 10, 8, 138, 30, 4, 12, 14, 4, 12, 8, 18, 12, 10, 2, 28, 8, 22, 6, 6, 6, 42, 2, 28, 12, 8, 12, 4, 6, 6, 2, 6, 12, 10, 20, 4, 18, 20, 60, 18, 10, 20, 10, 14, 18, 16, 12, 12, 12, 36, 24, 14, 4, 18, 38, 12, 54, 10, 8, 12, 36, 22, 20
Offset: 1

Views

Author

Jonathan Vos Post, Feb 03 2011

Keywords

Comments

Gaps between consecutive primes whose reversal is a different prime. This is to Differences between consecutive primes (A001223) as emirps (A006567) are to primes (A000040). This was indirectly suggested to me in a facebook conversation with Kevin L. Schwartz. One may use this to derive other sequences: records in emirp gaps; lower of pair of consecutive emirps with record gap; larger of pair of emirps with record gaps, by analogy with A005250, A002386, A000101.

Examples

			The first 9 emirps are 13, 17, 31, 37, 71, 73, 79, 97, 107.
Hence the first 8 gaps between consecutive emirps are:
   17 - 13 =  4;
   31 - 17 = 14;
   37 - 31 =  6;
   71 - 37 = 34;
   73 - 71 =  2 (i.e., 71 and 73 are a pair of "twin prime emirps");
   79 - 73 =  6;
   97 - 79 = 18;
  107 - 97 = 10.
So far, we see a minimum gap of 2, and a maximum of 34.
		

Crossrefs

Programs

  • Mathematica
    emirpQ[n_]:=Module[{idn=IntegerDigits[n],ridn},ridn=Reverse[idn];idn!=ridn&&PrimeQ[FromDigits[ridn]]]
    Take[Differences[Select[Prime[Range[1000]],emirpQ]],90]  (* Harvey P. Dale, Feb 18 2011 *)

Formula

a(n) = A006567(n+1) - A006567(n).

A270592 List of pairs: smallest pair of successive primes p & q such that p+1 & q+1 have n distinct prime divisors in common.

Original entry on oeis.org

2, 3, 3, 5, 23, 29, 18869, 18899, 1588761719, 1588761929
Offset: 0

Views

Author

Alon Kellner, Mar 19 2016

Keywords

Comments

All first 5 pairs are found and are proved to be a part of the sequence (using a computer program to find and prove them).
No other pairs were found yet.
The lower bound of the next pair (the 6th pair) is: 1425172824437699411. This is the lower end of the largest increasing primes gap confirmed (look up sequence A002386), that is because of that the gap is 1476 (look up sequence A005250), and the lowest difference possible for the 6th pair is 2310 or prime(5)# (look up sequence A002110), therefore the 2310 gap must be between larger primes than the pair of the maximal increasing prime gap, 1476.
The difference between the pairs is conjectured to be the primorials sequence: A002110.

Examples

			For n=2 the solution pair is p(2)=23, q(2)=29. p(2) & q(2) are successive primes, their consecutive numbers are p(2)+1=24, q(2)+1=30. Both 24 and 30 are multiples of both 2 and 3, which are two distinct primes. Since there are no smaller successive primes pair which is answering these criteria the pair (23, 29) is a part of the sequence, specifically the third pair in the sequence (n starts from 0).
		

Crossrefs

Programs

  • PARI
    a(n) = {p = 2; f = factor(p+1)[,1]~; forprime(q=3, , g = factor(q+1)[,1]~; if (#setintersect(f, g) == n, return (p)); p = q; f = g;);}

Formula

p - The lower end of the sequence
q - The upper end of the sequence
prime - The primes sequence
x# - The primorial function for x
x|y - x is a divisor of y
p(n)=prime(m)
q(n)=prime(m+1)
q(n)-p(n)=prime(n)# (conjectured)
prime(n)#|(p(n)+1) (conjectured)
prime(n)#|(q(n)+1) (conjectured)

A327427 Record gaps between primes which are palindromic in base 10.

Original entry on oeis.org

1, 2, 4, 90, 122, 344, 9372, 10112, 30914, 904312, 1002012, 3015114, 90040102, 100020012, 300141014, 9000772002, 10002210012, 30007060014, 900008800002, 1000014100012, 3000012000014, 90000335100002, 100000060000012, 300000181000014, 9000000712000002, 10000002210000012, 30000003520000014
Offset: 1

Views

Author

Chai Wah Wu, Sep 09 2019

Keywords

Comments

These are the gaps A002385(n+1) - A002385(n). The Banks et al. paper shows that this sequence is infinite if there exists an infinite number of palindromic primes.

Crossrefs

A335366 Primes preceding the first-occurrence gaps in A014320.

Original entry on oeis.org

2, 3, 7, 23, 89, 113, 139, 199, 523, 887, 1129, 1327, 1669, 1831, 2477, 2971, 4297, 5591, 9551, 15683, 16141, 19333, 19609, 28229, 30593, 31397, 31907, 34061, 35617, 43331, 44293, 81463, 82073, 89689, 134513, 155921, 162143, 173359, 188029, 212701, 265621
Offset: 1

Views

Author

Alexei Kourbatov, Jun 03 2020

Keywords

Comments

Contains A002386 as a subsequence. First differs from A002386 at a(7)=139. This sequence is a permutation of all positive terms of A000230, in increasing order. See A002386 and A005250 for more references and links.

Examples

			The first two primes are 2 and 3, and the first prime gap is 3 - 2 = 1; so a(1)=2. The next prime is 5, and the next gap is 5 - 3 = 2; this gap size has not occurred before, so a(2)=3. The next prime is 7, and the next gap is 7 - 5 = 2; the gap size 2 has already occurred before, so nothing is added to the sequence.
		

Crossrefs

Programs

  • PARI
    my(isFirstOcc=vector(9999, j, 1), s=2); forprime(p=3, 1e8, my(g=p-s); if(isFirstOcc[g], print1(s, ", "); isFirstOcc[g]=0); s=p)

Formula

a(n) = A335367(n) - A014320(n).

A335367 Primes at the end of the first-occurrence gaps in A014320.

Original entry on oeis.org

3, 5, 11, 29, 97, 127, 149, 211, 541, 907, 1151, 1361, 1693, 1847, 2503, 2999, 4327, 5623, 9587, 15727, 16183, 19373, 19661, 28277, 30631, 31469, 31957, 34123, 35671, 43391, 44351, 81509, 82129, 89753, 134581, 156007, 162209, 173429, 188107, 212777, 265703
Offset: 1

Views

Author

Alexei Kourbatov, Jun 03 2020

Keywords

Comments

Contains A000101 as a subsequence. First differs from A000101 at a(7)=149. See A000101, A002386 and A005250 for more references and links.

Examples

			The first two primes are 2 and 3, and the first prime gap is 3 - 2 = 1; so a(1)=3. The next prime is 5, and the next gap is 5 - 3 = 2; this gap size has not occurred before, so a(2)=5. The next prime is 7, and the next gap is 7 - 5 = 2; the gap size 2 has already occurred before, so nothing is added to the sequence.
		

Crossrefs

Programs

  • PARI
    my(isFirstOcc=vector(9999, j, 1), s=2); forprime(p=3, 1e8, my(g=p-s); if(isFirstOcc[g], print1(p, ", "); isFirstOcc[g]=0); s=p)

Formula

a(n) = A335366(n) + A014320(n).

A338567 Primes p such that (q*r) mod p is prime, where q and r are the next primes after p.

Original entry on oeis.org

3, 5, 7, 13, 19, 23, 31, 89, 199
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 02 2020

Keywords

Comments

a(10) > 2*10^10 if it exists. - Michael S. Branicky, Mar 05 2021
From Jason Yuen, Jun 11 2024: (Start)
All terms satisfy (q-p)*(r-p) > p.
Data from A002386 and A005250 show that a(10) > 18361375334787046697 if it exists. (End)
Note that q*r == (q-p)*(r-p) (mod p). As soon as the prime gap grows slow enough, for all large enough p we have (q*r) mod p = (q-p)*(r-p), which is composite, implying finiteness of this sequence. In particular, finiteness would follow from Cramer's conjecture. - Max Alekseyev, Nov 09 2024

Examples

			a(4)=13 is in the sequence because it is prime, the next two primes are 17 and 19, and (17*19) mod 13 = 11, which is prime.
		

Crossrefs

Cf. A338566, A338570. Contained in A338577.

Programs

  • Maple
    R:= NULL: q:= 2: r:= 3:
    count:= 0:
    for i from 1 to 10000 do
      p:= q; q:= r; r:= nextprime(r);
      if isprime(q*r mod p) then count:= count+1; R:= R, p fi
    od:
    R;
  • Python
    from sympy import nextprime, isprime
    def afind(limit):
      p, q, r = 1, 2, 3
      while p < limit:
        p, q, r = q, r, nextprime(r)
        if isprime(q*r % p): print(p, end=", ")
    afind(200) # Michael S. Branicky, Mar 05 2021
Previous Showing 31-40 of 67 results. Next