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-10 of 20 results. Next

A060211 Larger term of a pair of twin primes such that the prime factors of their average are only 2 and 3. Proper subset of A058383.

Original entry on oeis.org

7, 13, 19, 73, 109, 193, 433, 1153, 2593, 139969, 472393, 786433, 995329, 57395629, 63700993, 169869313, 4076863489, 10871635969, 2348273369089, 56358560858113, 79164837199873, 84537841287169, 150289495621633, 578415690713089, 1141260857376769, 57711166318706689
Offset: 1

Views

Author

Labos Elemer, Mar 20 2001

Keywords

Comments

Larger of twin primes p such that p-1 = (2^u)*(3^w), u,w >= 1.

Examples

			a(4) = 73, {71,73} are twin primes and (71 + 73)/2 = 72 = 2*2*2*3*3.
		

Crossrefs

Programs

  • Mathematica
    Take[Select[Sort[Flatten[Table[2^a 3^b,{a,250},{b,250}]]],AllTrue[#+{1,-1},PrimeQ]&]+1,23] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 17 2019 *)
  • PARI
    isok(p) = isprime(p) && isprime(p-2) && (vecmax(factor(p-1)[,1]) == 3); \\ Michel Marcus, Sep 05 2017

Formula

a(n) = A027856(n+1) + 1. - Amiram Eldar, Mar 17 2025

Extensions

Name corrected by Sean A. Irvine, Oct 31 2022

A027856 Dan numbers: numbers m of the form 2^j * 3^k such that m +- 1 are twin primes.

Original entry on oeis.org

4, 6, 12, 18, 72, 108, 192, 432, 1152, 2592, 139968, 472392, 786432, 995328, 57395628, 63700992, 169869312, 4076863488, 10871635968, 2348273369088, 56358560858112, 79164837199872, 84537841287168, 150289495621632, 578415690713088, 1141260857376768
Offset: 1

Views

Author

Richard C. Schroeppel

Keywords

Comments

Special twin prime averages (A014574).
Intersection of A014574 and A003586. - Jeppe Stig Nielsen, Sep 05 2017

Examples

			a(14) = 243*4096 = 995328 and {995327, 995329} are twin primes.
		

Crossrefs

Programs

  • Mathematica
    Select[#, Total@ Boole@ Map[PrimeQ, # + {-1, 1}] == 2 &] &@ Select[Range[10^7], PowerMod[6, #, #] == 0 &] (* Michael De Vlieger, Dec 31 2016 *)
    seq[max_] := Select[Sort[Flatten[Table[2^i*3^j, {i, 1, Floor[Log2[max]]}, {j, 0, Floor[Log[3, max/2^i]]}]]], And @@ PrimeQ[# + {-1, 1}] &]; seq[2*10^15] (* Amiram Eldar, Aug 27 2024 *)

Formula

a(n) = A078883(n) + 1 = A078884(n) - 1. - Amiram Eldar, Aug 27 2024

Extensions

Offset corrected by Donovan Johnson, Dec 02 2011
Entry revised by N. J. A. Sloane, Jan 01 2017

A035095 Smallest prime congruent to 1 (mod prime(n)).

Original entry on oeis.org

3, 7, 11, 29, 23, 53, 103, 191, 47, 59, 311, 149, 83, 173, 283, 107, 709, 367, 269, 569, 293, 317, 167, 179, 389, 607, 619, 643, 1091, 227, 509, 263, 823, 557, 1193, 907, 1571, 653, 2339, 347, 359, 1087, 383, 773, 3547, 797, 2111, 2677, 5449, 2749, 467
Offset: 1

Views

Author

Keywords

Comments

This is a version of the "least prime in special arithmetic progressions" problem.
Smallest numbers m such that largest prime factor of Phi(m) = prime(n), the n-th prime, also seems to be prime and identical to n-th term of A035095. See A068211, A068212, A065966: Min[x : A068211(x)=prime(n)] = A035095(n); e.g., Phi(a(7)) = Phi(103) = 2*3*17, of which 17 = p(7) is the largest prime factor, arising first here.
It appears that A035095, A066674, A125878 are probably all the same, but see the comments in A066674. - N. J. A. Sloane, Jan 05 2013
Minimum of the smallest prime factors of F(n,i) = (i^prime(n)-1)/(i-1), when i runs through all integers in [2, prime(n)]. Every prime factor of F(n,i) is congruent to 1 modulo prime(n). - Vladimir Shevelev, Nov 26 2014
Conjecture: a(n) is the smallest prime p such that gpf(p-1) = prime(n). See A023503. - Thomas Ordowski, Aug 06 2017
For n>1, a(n) is the smallest prime congruent to 1 mod (2*prime(n)). - Chai Wah Wu, Apr 28 2025

Examples

			a(8) = 191 because in the prime(8)k+1 = 19k+1 sequence, 191 is the smallest prime.
		

References

  • E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Bd 1 (reprinted Chelsea 1953).
  • E. C. Titchmarsh, A divisor problem, Renc. Circ. Math. Palermo, 54 (1930) pp. 414-429.
  • P. Turan, Über Primzahlen der arithmetischen Progression, Acta Sci. Math. (Szeged), 8 (1936/37) pp. 226-235.

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{p = Prime[n]}, r = 1 + p; While[ !PrimeQ[r], r += p]; r]; Array[a, 51] (* Jean-François Alcover, Sep 20 2011, after PARI *)
    a[n_]:=If[n<2,3,Block[{p=Prime[n]},r=1+2*p;While[!PrimeQ[r],r+=2*p]];r];Array[a,51] (* Zak Seidov, Dec 14 2013 *)
  • PARI
    a(n)=local(p,r);p=prime(n);r=1;while(!isprime(r),r+=p);r
    
  • PARI
    {my(N=66); forprime(p=2, , forprime(q=p+1,10^10, if((q-1)%p==0, print1(q,", "); N-=1; break)); if(N==0,break)); } \\ Joerg Arndt, May 27 2016
    
  • Python
    from itertools import count
    from sympy import prime, isprime
    def A035095(n): return 3 if n==1 else next(filter(isprime,count((p:=prime(n)<<1)+1,p))) # Chai Wah Wu, Apr 28 2025

Formula

According to a long-standing conjecture (see the 1979 Wagstaff reference), a(n) <= prime(n)^2 + 1. This would be sufficient to imply that a(n) is the smallest prime such that greatest prime divisor of a(n)-1 is prime(n), the n-th prime: A006530(a(n)-1) = A000040(n). This in turn would be sufficient to imply that no value occurs twice in this sequence. - Franklin T. Adams-Watters, Jun 18 2010
a(n) = 1 + A035096(n)*A000040(n). - Zak Seidov, Dec 27 2013

Extensions

Edited by Franklin T. Adams-Watters, Jun 18 2010
Minor edits by N. J. A. Sloane, Jun 27 2010
Edited by N. J. A. Sloane, Jan 05 2013

A059960 Smaller term of a pair of twin primes such that prime factors of their average are only 2 and 3.

Original entry on oeis.org

5, 11, 17, 71, 107, 191, 431, 1151, 2591, 139967, 472391, 786431, 995327, 57395627, 63700991, 169869311, 4076863487, 10871635967, 2348273369087, 56358560858111, 79164837199871, 84537841287167, 150289495621631, 578415690713087, 1141260857376767
Offset: 1

Views

Author

Labos Elemer, Mar 02 2001

Keywords

Comments

Lesser of twin primes p such that p+1 = (2^u)*(3^w), u,w >= 1.
Primes p(k) such that the number of distinct prime divisors of all composite numbers between p(k) and p(k+1) is 2. - Amarnath Murthy, Sep 26 2002

Examples

			a(11)+1 = 2*2*2*3*3*3*3*3*3*3*3*3*3 = 472392.
		

Crossrefs

Programs

  • Mathematica
    nn=10^15; Sort[Reap[Do[n=2^i 3^j; If[n<=nn && PrimeQ[n-1] && PrimeQ[n+1], Sow[n-1]], {i, Log[2, nn]}, {j, Log[3, nn]}]][[2, 1]]]
    Select[Select[Partition[Prime[Range[38*10^5]],2,1],#[[2]]-#[[1]]==2&][[All,1]],FactorInteger[#+1][[All,1]]=={2,3}&] (* The program generates the first 15 terms of the sequence. *)
    seq[max_] := Select[Sort[Flatten[Table[2^i*3^j - 1, {i, 1, Floor[Log2[max]]}, {j, 1, Floor[Log[3, max/2^i]]}]]], And @@ PrimeQ[# + {0, 2}] &]; seq[2*10^15] (* Amiram Eldar, Aug 27 2024 *)

Formula

a(n) = A027856(n+1) - 1. - Amiram Eldar, Mar 17 2025

A060212 Primes q such that 6*q-1 and 6*q+1 are twin primes. Proper subset of A002822.

Original entry on oeis.org

2, 3, 5, 7, 17, 23, 47, 103, 107, 137, 283, 313, 347, 373, 397, 443, 467, 577, 593, 653, 773, 787, 907, 1033, 1117, 1423, 1433, 1613, 1823, 2027, 2063, 2137, 2153, 2203, 2287, 2293, 2333, 2347, 2677, 2903, 3257, 3307, 3407, 3413, 3593, 3623, 3673, 3923
Offset: 1

Views

Author

Labos Elemer, Mar 20 2001

Keywords

Comments

Primes in A182521. Also all primes p for which A182481(p)=1. - Vladimir Shevelev, May 03 2012
Conjecture: a(n) ~ n*log(n)*log(n*log(n))*log(log(n)). - Carl R. White, Nov 16 2023

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[6*p-1] && PrimeQ[6*p+1], AppendTo[lst,p]], {n,100}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 16 2009 *)
  • PARI
    forprime(p=2, 9999, if(isprime(6*p+1) & isprime(6*p-1), print(p))) \\ David Radcliffe, Apr 02 2016
    
  • Python
    from sympy import *; print([p for p in primerange(2,9999) if isprime(6*p-1) and isprime(6*p+1)]) # David Radcliffe, Apr 02 2016

A125866 Odd numbers k such that cos(2*Pi/k) is an algebraic number of a 3-smooth degree, but not 2-smooth.

Original entry on oeis.org

7, 9, 13, 19, 21, 27, 35, 37, 39, 45, 57, 63, 65, 73, 81, 91, 95, 97, 105, 109, 111, 117, 119, 133, 135, 153, 163, 171, 185, 189, 193, 195, 219, 221, 243, 247, 259, 273, 285, 291, 315, 323, 327, 333, 351, 357, 365, 399, 405, 433, 455, 459, 481, 485, 487, 489
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Comments

Odd terms of A051913.
This sequence is infinite (unlike A004729), because it contains any A058383(n) times any power of 3.
A regular polygon of a(n) sides can be constructed if one also has an angle trisector.

Crossrefs

Programs

  • Maple
    filter:= proc(n) local r,a,b;
      r:= numtheory:-phi(n);
      a:= padic:-ordp(r,2);
      b:= padic:-ordp(r,3);
      if b = 0 then return false fi;
      r = 2^a*3^b;
    end proc:
    select(filter, [seq(i,i=3..1000,2)]); # Robert Israel, May 11 2020
  • Mathematica
    Do[If[Take[FactorInteger[EulerPhi[2n+1]][[ -1]], 1]=={3},Print[2n+1]],{n,1,10000}]

Extensions

Edited by Don Reble, Apr 24 2007

A216148 Primes of the form 2*k^k + 1 = A216147(k).

Original entry on oeis.org

3, 17832200896513, 78692816150593075150849
Offset: 1

Views

Author

M. F. Hasler, Sep 02 2012

Keywords

Comments

The sequence should be extended through A110932, which lists the corresponding values of k: The next term, 2*251^251 + 1 = A216147(A110932(4)) ~ 4.16*10^602, is too large to include here.

Crossrefs

Cf. A110932.
A subsequence of A133663, with b=a and c=1.

Programs

  • Mathematica
    Select[Table[2n^n+1,{n,20}],PrimeQ] (* Harvey P. Dale, Mar 27 2016 *)
  • PARI
    for(n=1,999, ispseudoprime(p=n^n*2+1) & print1(p","))

Formula

a(2) = A216147(12) = A005109(95) = A070855(12) = A058383(89) = A133663(18).
a(3) = A216147(18) = A005109(183)= A070855(18) = A058383(177)= A133663(36).

A060213 Lesser of twin primes whose average is 6 times a prime.

Original entry on oeis.org

11, 17, 29, 41, 101, 137, 281, 617, 641, 821, 1697, 1877, 2081, 2237, 2381, 2657, 2801, 3461, 3557, 3917, 4637, 4721, 5441, 6197, 6701, 8537, 8597, 9677, 10937, 12161, 12377, 12821, 12917, 13217, 13721, 13757, 13997, 14081, 16061, 17417
Offset: 1

Views

Author

Labos Elemer, Mar 20 2001

Keywords

Comments

Lowest factor-density among all positive consecutive integer triples; for p > 41, last digit of p can be only 1 or 7 (see Alexandrov link, p. 15). - Lubomir Alexandrov, Nov 25 2001

Examples

			102197 is here because 102198 = 17033*6 and 17033 is prime.
		

Crossrefs

Programs

  • Maple
    map(t -> 6*t-1, select(p -> isprime(p) and isprime(6*p-1) and isprime(6*p+1), [2,seq(i,i=3..10000,2)]));
  • Mathematica
    Transpose[Select[Partition[Prime[Range[2500]],2,1],#[[2]]-#[[1]] == 2 && PrimeQ[Mean[#]/6]&]][[1]] (* Harvey P. Dale, May 04 2014 *)
  • PARI
    isok(n) = isprime(n) && isprime(n+2) && !((n+1) % 6) && isprime((n+1)/6); \\ Michel Marcus, Dec 14 2013

Formula

a(n) = 6 * A060212(n) - 1. - Sean A. Irvine, Oct 31 2022

Extensions

Offset changed to 1 by Michel Marcus, Dec 14 2013

A336773 a(n) is the least prime of the form 2^j*3^k + 1, j > 0, k > 0, j + k = n. a(n) = 0 if no such prime exists.

Original entry on oeis.org

7, 13, 37, 73, 97, 193, 577, 769, 3457, 10369, 0, 12289, 629857, 839809, 147457, 995329, 1990657, 786433, 5308417, 120932353, 14155777, 28311553, 0, 113246209, 29386561537, 3439853569, 6879707137, 1811939329, 18345885697, 3221225473, 1253826625537, 0, 85691213438977
Offset: 2

Views

Author

Hugo Pfoertner, Aug 28 2020

Keywords

Crossrefs

Cf. A033845, A058383, A336772 (positions of 0).

Programs

  • Maple
    f:= proc(n) local k,p;
       for k from 1 to n-1 do
         p:= 2^(n-k)*3^k+1;
         if isprime(p) then return p fi
       od;
       0
    end proc:
    map(f, [$2..40]); # Robert Israel, Aug 30 2020
  • PARI
    for(n=2,34, my(pm=oo); for(j=1,n-1, my(k=n-j,p=2^j*3^k+1);if(isprime(p),pm=min(p,pm))); print1(if(pm==oo,0,pm),", "))

A051913 Numbers k such that phi(k)/phi(phi(k)) = 3.

Original entry on oeis.org

7, 9, 13, 14, 18, 19, 21, 26, 27, 28, 35, 36, 37, 38, 39, 42, 45, 52, 54, 56, 57, 63, 65, 70, 72, 73, 74, 76, 78, 81, 84, 90, 91, 95, 97, 104, 105, 108, 109, 111, 112, 114, 117, 119, 126, 130, 133, 135, 140, 144, 146, 148, 152, 153, 156, 162, 163, 168, 171, 180, 182
Offset: 1

Views

Author

J. H. Conway and Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), Dec 17 1999

Keywords

Comments

Also numbers k such that phi(k) = 2^a*3^b with a, b > 0.
Also numbers k such that a regular k-gon can be constructed using conics but not with merely a compass and straightedge.
"Constructed using conics" means that one can draw any conic, once its focus, its vertex and a point on its directrix are constructed. Points at intersections are thereby constructed. (Videla's definition is slightly more complicated, but equivalent.) One can use parabolas to take cube roots; hyperbolas yield trisected angles. - Don Reble, Apr 23 2007

Examples

			Phi(999) = Phi(3*3*3*37) = 648 = 8*81.
		

References

  • George E. Martin, Geometric Constructions, Springer, 1997, p. 140.

Crossrefs

Programs

  • Magma
    [n: n in [1..200] | EulerPhi(n)/EulerPhi(EulerPhi(n)) eq 3]; // Vincenzo Librandi, Apr 17 2015
    
  • Mathematica
    lf[x_] := Length[FactorInteger[x]] eu[x_] := EulerPhi[x] Do[s=lf[eu[n]]; If[Equal[s, 2]&&Equal[Mod[eu[n], 6], 0], Print[n]], {n, 1, 1000}] (* Labos Elemer, Dec 28 2001 *)
    f[n_] := Block[{m = n}, If[m > 0, While[ IntegerQ[m/2], m /= 2]; While[ IntegerQ[m/3], m /= 3]]; m == 1]; fQ[n_] := Block[{pff = Select[ FactorInteger[n], #[[1]] > 3 &]}, pf = Flatten[{2, Table[ #[[1]], {1}] & /@ pff}]; pfe = Union[ Flatten[{1, Table[ #[[2]], {1}] & /@ pff}]]; If[ Union[f /@ (pf - 1)] == {True} && pfe == {1} && !IntegerQ[ Log[2, EulerPhi[ n]]], True, False]]; Select[ Range[184], fQ[ # ] &] (* Robert G. Wilson v, Apr 05 2005 *)
    Select[Range[200],EulerPhi[#]/EulerPhi[EulerPhi[#]]==3&] (* Harvey P. Dale, Jul 11 2025 *)
  • Python
    from itertools import count, islice
    from sympy import primefactors, totient
    def A051913_gen(): # generator of terms
        yield from filter(lambda n: primefactors(totient(n)) == [2,3], count(1))
    A051913_list = list(islice(A051913_gen(),30)) # Chai Wah Wu, Apr 02 2025

Formula

Numbers k of the form 2^a*3^b*p*q*r*..., where p, q, r, ... are distinct primes of the form 2^x*3^y + 1 (i.e., belong to A005109) and phi(k) is not a power of 2 [Videla]. - Robert G. Wilson v, Apr 05 2005

Extensions

Additional comments from Labos Elemer, Dec 28 2001
Additional comments from Benoit Cloitre, Jan 26 2002
Edited by N. J. A. Sloane, Apr 21 2007
Entries checked by Don Reble, Apr 23 2007
Showing 1-10 of 20 results. Next