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

A336772 Sums s of positive exponents such that no prime of the form 2^j*3^k + 1 with j + k = s exists.

Original entry on oeis.org

12, 24, 33, 46, 48, 60, 72, 74, 80, 96, 102, 111, 118, 120, 130, 132, 141, 142, 144, 147, 159, 162, 165, 166, 168, 186, 200, 216, 234, 240, 242, 252, 258, 288, 306, 309, 312, 318, 358, 370, 374, 375, 384, 399, 405, 408, 414, 420, 432, 435, 462, 464, 468, 478
Offset: 1

Views

Author

Hugo Pfoertner, based on a suggestion from Rainer Rosenthal, Aug 24 2020

Keywords

Examples

			a(1) = 12, because none of the 11 numbers {2^1*3^11+1, 2^2*3^10+1, ..., 2^11*3^1+1} = {354295, 236197, 157465, 104977, 69985, 46657, 31105, 20737, 13825, 9217, 6145} is prime,
a(2) = 24: none of the 23 numbers {2^1*3^23+1, 2^2*3^22+1, ..., 2^23*3^1+1} = {188286357655, 125524238437, 83682825625, 55788550417, ..., 56623105, 37748737, 25165825} is prime.
		

Crossrefs

Programs

  • PARI
    for(s=2,500, my(t=1); for(j=1,s-1, my(k=s-j); if(isprime(2^j*3^k+1),t=0;break)); if(t,print1(s,", ")))

A061599 Primes p such that the greatest prime divisor of p-1 is 5.

Original entry on oeis.org

11, 31, 41, 61, 101, 151, 181, 241, 251, 271, 401, 541, 601, 641, 751, 811, 1201, 1601, 1621, 1801, 2161, 2251, 3001, 4001, 4051, 4801, 4861, 6481, 7681, 8101, 8641, 9001, 9601, 9721, 11251, 14401, 15361, 16001, 19441, 21601, 21871, 22501, 23041, 24001
Offset: 1

Views

Author

Labos Elemer, Jun 13 2001

Keywords

Comments

Prime numbers n for which cos(2Pi/n) is an algebraic number of 5th degree. - Artur Jasinski, Dec 13 2006
The least significant digit of each term is one. - Harvey P. Dale, Jul 07 2024

Crossrefs

The 3rd in a family of sequences after A019434(=Fermat-primes) and A058383.

Programs

  • Mathematica
    Do[If[Take[FactorInteger[EulerPhi[2n + 1]][[ -1]],1] == {5} && PrimeQ[2n + 1], Print[2n + 1]], {n, 1, 10000}] (* Artur Jasinski, Dec 13 2006 *)
    Select[Prime[Range[3000]],Max[FactorInteger[#-1][[;;,1]]]==5&] (* Harvey P. Dale, Jul 07 2024 *)
  • PARI
    { default(primelimit, 167772161); n=0; forprime (p=3, 167772161, f=factor(p - 1)~; if (f[1, length(f)]==5, write("b061599.txt", n++, " ", p)) ) } \\ Harry J. Smith, Jul 25 2009
    
  • PARI
    list(lim)=my(v=List(), s, t); lim\=1; lim--; for(i=1, logint(lim\2, 5), t=2*5^i; for(j=0, logint(lim\t, 3), s=t*3^j; while(s<=lim, if(isprime(s+1), listput(v, s+1)); s<<=1))); Set(v) \\ Charles R Greathouse IV, Oct 29 2018

Formula

Primes of the form 2^a*3^b*5^c + 1 with a and c > 0.

A125867 Numbers k such that p=6k+1 is prime and cos(2*Pi/p) is an algebraic number of a 3-smooth degree, but not 2-smooth.

Original entry on oeis.org

1, 2, 3, 6, 12, 16, 18, 27, 32, 72, 81, 96, 128, 192, 216, 243, 432, 486, 576, 648, 1728, 2048, 2916, 3072, 6561, 8748, 23328, 24576, 34992, 55296, 78732, 104976, 124416, 131072, 139968, 165888, 196608, 248832, 294912, 331776, 442368, 839808
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Comments

Numbers k such that p=6k+1 is prime and the greatest prime divisor of p-1 is 3.

Crossrefs

Programs

  • Mathematica
    Do[If[Take[FactorInteger[EulerPhi[6n+1]][[ -1]], 1]=={3} && PrimeQ[6n+1],Print[n]],{n,1,100000}]

Extensions

Edited by Don Reble, Apr 24 2007

A266268 Numbers n such that phi(n) = 3*phi(n-1).

Original entry on oeis.org

7, 13, 19, 37, 73, 91, 97, 109, 163, 193, 433, 487, 577, 703, 769, 793, 925, 1153, 1297, 1459, 2593, 2917, 3457, 3889, 4699, 5551, 6697, 7999, 8701, 10369, 10591, 11803, 12289, 16471, 17497, 18433, 33251, 39367, 52489, 56791, 79249, 124357, 127927, 137899
Offset: 1

Views

Author

Jaroslav Krizek, Dec 26 2015

Keywords

Comments

Prime terms are in A058383.
See A266276(n) = the smallest numbers k such that phi(k) = n * phi(k-1) for n >=1: 2, 3, 7, 1261, 11242771, ...
Number of terms < 10^k: 1, 7, 17, 29, 41, 86, 205, 446, 1001, 2295, ..., . - Robert G. Wilson v, Jan 24 2016
All terms are == +-1 (mod 6) but mostly 1 (> 95%). - Robert G. Wilson v, Jan 24 2016

Examples

			19 is in the sequence because phi(19) = 18 = 3*phi(18) = 3*6.
		

Crossrefs

Cf. A000010, A058383, A171271 (numbers n such that phi(n) = 2*phi(n-1)), A266276.

Programs

  • Magma
    [n: n in [2..2*10^5] | EulerPhi(n) eq 3*EulerPhi(n-1)]; // Vincenzo Librandi, Dec 26 2015
    
  • Mathematica
    Select[Range[5000], EulerPhi[ # ]==3*EulerPhi[ #-1]&] (* G. C. Greubel, Dec 26 2015 *)
  • PARI
    isok(n) = eulerphi(n) == 3*eulerphi(n-1); \\ Michel Marcus, Dec 27 2015
    
  • PARI
    lista(nn) = for(n=1, nn, if(eulerphi(n) == 3*eulerphi(n-1), print1(n, ", "))); \\ Altug Alkan, Jan 24 2016

Formula

a(n) = A067143(n) + 1.

A217035 Generalized cuban primes (A007645) which are also Class 1- (or Pierpont) primes (A005109).

Original entry on oeis.org

3, 7, 13, 19, 37, 73, 97, 109, 163, 193, 433, 487, 577, 769, 1153, 1297, 1459, 2593, 2917, 3457, 3889, 10369, 12289, 17497, 18433, 39367, 52489, 139969, 147457, 209953, 331777, 472393, 629857, 746497, 786433, 839809, 995329, 1179649, 1492993, 1769473
Offset: 1

Views

Author

Jonathan Vos Post, Sep 24 2012

Keywords

Comments

Is this the union of A058383 and {3}? - R. J. Mathar, Sep 28 2012
Yes, it is, because the only Fermat prime == 0 or 1 mod 3 is 3. - Robert Israel, Mar 02 2018
Generalized cuban primes are primes of the form x^2 + xy + y^2; or: primes of form x^2 + 3*y^2; or: primes == 0 or 1 mod 3. Class 1- (or Pierpont) primes: primes of the form 2^t*3^u + 1.

Crossrefs

Programs

  • Mathematica
    nn = 100000; t1 = Join[{3}, Select[Prime[Range[nn]], MemberQ[{1}, Mod[#, 3]] &]]; t2 = Select[Prime[Range[nn]], Max @@ First /@ FactorInteger[# - 1] < 5 &]; Intersection[t1, t2] (* T. D. Noe, Sep 26 2012 *)

Formula

A007645 INTERSECTION A005109.

A284037 Primes p such that p-1 and p+1 have two distinct prime factors.

Original entry on oeis.org

11, 13, 19, 23, 37, 47, 53, 73, 97, 107, 163, 193, 383, 487, 577, 863, 1153, 2593, 2917, 4373, 8747, 995327, 1492993, 1990657, 5308417, 28311553, 86093443, 6879707137, 1761205026817, 2348273369087, 5566277615617, 7421703487487, 21422803359743, 79164837199873
Offset: 1

Views

Author

Giuseppe Coppoletta, Mar 28 2017

Keywords

Comments

Either p-1 or p+1 must be of the form 2^i * 3^j, since among three consecutive numbers exactly one is a multiple of 3. - Giovanni Resta, Mar 29 2017
Subsequence of A219528. See the previous comment. - Jason Yuen, Mar 08 2025

Examples

			7 is not a term because n + 1 = 8 has only one prime factor.
23 is a term because it is prime and n - 1 = 22 has two distinct prime factors (2, 11) and n + 1 = 24 has two distinct prime factors (2, 3).
43 is not a term because n - 1 = 42 has three distinct prime factors (2, 3, 7).
		

Crossrefs

Programs

  • Maple
    N:= 10^20: # To get all terms <= N
    Res:= {}:
    for i from 1 to ilog2(N) do
      for j from 1 to floor(log[3](N/2^i)) do
        q:= 2^i*3^j;
        if isprime(q-1) and nops(numtheory:-factorset((q-2)/2^padic:-ordp(q-2,2)))=1 then Res:= Res union {q-1} fi;
        if isprime(q+1) and nops(numtheory:-factorset((q+2)/2^padic:-ordp(q+2,2)))=1 then Res:= Res union {q+1} fi
    od od:
    sort(convert(Res,list)); # Robert Israel, Apr 16 2017
  • Mathematica
    mx = 10^30; ok[t_] := PrimeQ[t] && PrimeNu[t-1]==2==PrimeNu[t+1]; Sort@ Reap[Do[ w = 2^i 3^j; Sow /@ Select[ w+ {1,-1}, ok], {i, Log2@ mx}, {j, 1, Log[3, mx/2^i]}]][[2, 1]] (* terms up to mx, Giovanni Resta, Mar 29 2017 *)
  • PARI
    isok(n) = isprime(n) && (omega(n-1)==2) && (omega(n+1)==2); \\ Michel Marcus, Apr 17 2017
  • Sage
    omega=sloane.A001221; [n for n in prime_range(10^6) if 2==omega(n-1)==omega(n+1)]
    
  • Sage
    sorted([2^i*3^j+k for i in (1..40) for j in (1..20) for k in (-1,1) if is_prime(2^i*3^j+k) and sloane.A001221(2^i*3^j+2*k)==2])
    

Formula

A001221(a(n)) = 1 and A001221(a(n) - 1) = A001221(a(n) + 1) = 2.

Extensions

a(33)-a(34) from Giovanni Resta, Mar 29 2017

A061638 Primes p such that the greatest prime divisor of p-1 is 7.

Original entry on oeis.org

29, 43, 71, 113, 127, 197, 211, 281, 337, 379, 421, 449, 491, 631, 673, 701, 757, 883, 1009, 1051, 1373, 1471, 2017, 2269, 2521, 2647, 2689, 2801, 3137, 3361, 3529, 4201, 4481, 5881, 6301, 7001, 7057, 7351, 7561, 7841, 8233, 8821, 10501, 10753, 12097
Offset: 1

Views

Author

Labos Elemer, Jun 13 2001

Keywords

Comments

Prime numbers n for which cos(2*Pi/n) is an algebraic number of 7th degree. - Artur Jasinski, Dec 13 2006

Examples

			For n = {4, 8, 9, 12}, a(n)-1 = {70, 210, 280, 420} = 7*{10, 30, 40, 60}.
		

Crossrefs

The 4th in a family of sequences after A019434(=Fermat-primes), A058383, A061599.

Programs

  • Mathematica
    Select[Prime[Range[2000]],FactorInteger[#-1][[-1,1]] ==7&]  (* Harvey P. Dale, Mar 12 2011 *)
  • PARI
    default(primelimit, 108864001); n=0; forprime (p=3, 108864001, f=factor(p - 1)~; if (f[1, length(f)]==7, write("b061638.txt", n++, " ", p))) \\ Harry J. Smith, Jul 25 2009
    
  • PARI
    list(lim)=my(v=List(), t, t5, t7); lim\=1; lim--; for(a=1, logint(lim\2, 7), t7=2*7^a; for(b=0, logint(lim\t7, 5), t5=5^b*t7; for(c=0, logint(lim\t5, 3), t=3^c*t5; while(t<=lim, if(isprime(t+1), listput(v, t+1)); t<<=1)))); Set(v) \\ Charles R Greathouse IV, Oct 29 2018

Formula

Primes of form 2^a*3^b*5^c*7^d + 1 with a and d > 1.

A277173 Numbers m such that b^sigma(m) == b^phi(m) == b^numdiv(m) == b^m (mod m) for every integer b.

Original entry on oeis.org

1, 2, 6, 12, 24, 60, 120, 126, 240, 420, 480, 504, 672, 780, 1248, 1260, 2340, 2520, 3360, 4680, 5040, 5460, 6240, 6552, 8160, 8736, 9360, 10080, 11424, 16380, 21216, 26208, 27360, 32760, 38304, 43680, 57120, 65520, 71136, 74592, 106080, 131040, 147168, 148512, 171360, 191520, 202464, 325920, 355680, 372960
Offset: 1

Views

Author

David A. Corneth and Altug Alkan, Oct 02 2016

Keywords

Comments

Are terms products products of primes of the form 2^i*3^j + 1, A058383, for some nonnegative i and j? This is true for all terms up to 7.6*10^6. 7600320 is divisible by 29, which isn't of the form 2^j*3^i+1. Up to 10^8, all of the terms are divisible by only 16 distinct prime factors. That is: omega(lcm(all terms up to 10^8)) = 16.
Subsequence of A124240.

Examples

			6 is a term because for the primes up to 6, (2, 3 and 5), b^sigma(6) == b^phi(6) == b^numdiv(6) == b^6 (mod 6). This is sufficient to prove for all values b up to 6.
		

Crossrefs

Cf. A124240.

Programs

  • Mathematica
    fQ[n_] := Block[{b = 2, s = DivisorSigma[1, n], e = EulerPhi[n], d = DivisorSigma[0, n]}, While[b < n && PowerMod[b, s, n] == PowerMod[b, e, n] == PowerMod[b, d, n] == PowerMod[b, n, n], b = NextPrime@ b]; b >= n]; lst = {1}; k = 2; While[k < 400000, If[ fQ@ k, AppendTo[lst, k]]; k ++]; lst (* Robert G. Wilson v, Nov 04 2016 *)
  • PARI
    isk(n, k) = {Mod(k, n)^sigma(n)==Mod(k, n)^n && Mod(k, n)^eulerphi(n)==Mod(k, n)^n && Mod(k, n)^numdiv(n)==Mod(k, n)^n}
    is(n) = my(i);forprime(i=2, n, if(isk(n, i)==0,return(0))) ; 1
    upto(lim) = my(l=List());for(n=1, lim, if(is(n), listput(l,n))); l

A379445 a(n) = gpf(prime(n)-1)*gpf(prime(n)+1), where gpf is A006530.

Original entry on oeis.org

4, 6, 6, 15, 21, 6, 15, 33, 35, 10, 57, 35, 77, 69, 39, 145, 155, 187, 21, 111, 65, 287, 55, 21, 85, 221, 159, 33, 133, 14, 143, 391, 161, 185, 95, 1027, 123, 581, 1247, 445, 65, 57, 291, 77, 55, 371, 259, 2147, 437, 377, 85, 55, 35, 86, 1441, 335, 85, 3197, 329, 3337
Offset: 2

Views

Author

Hugo Pfoertner, Dec 28 2024

Keywords

Comments

Observation: Even terms of A006881 not occurring in this sequence are, e.g., 22, 34, 38, 46, ..., due to the sparseness of Mersenne primes (A000668) and Fermat primes (A000215). Also missing are many multiples of 3, e.g., 3*{31, 67, 79, 83, 101, 103, 113, ...}, as a consequence of the gaps of A058383 and A268640 and the size distribution of prime factors, i.e., the rareness of smooth numbers.

Examples

			a(43390) = 146 because 2^19-1 = A000668(5) is the 43390th prime and the greatest prime factor of 2^19-2 is 73.
		

Crossrefs

Each term > 4 is element of A006881.

Programs

  • Mathematica
    Table[Times @@ Map[FactorInteger[#][[-1, 1]] &, Prime[n] + {-1, 1}], {n, 2, 61}] (* Michael De Vlieger, Jan 20 2025 *)
  • PARI
    a379445(n) = my (p=prime(n), fm=factor(p-1), fp=factor(p+1)); fm[#fm~,1]*fp[#fp~,1]

Formula

a(n) = A023503(n)*A023509(n). - Michel Marcus, Jan 21 2025

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

Original entry on oeis.org

11, 25, 31, 33, 41, 55, 61, 75, 77, 93, 99, 101, 123, 125, 143, 151, 155, 165, 175, 181, 183, 187, 205, 209, 217, 225, 231, 241, 251, 271, 275, 279, 287, 297, 303, 305, 325, 341, 369, 375, 385, 401, 403, 407, 425, 427, 429, 451, 453, 465, 475, 495, 505, 525
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006

Keywords

Comments

A regular polygon of a(n) sides can be constructed if one also has an angle trisector and 5-sector.

Crossrefs

Programs

  • Mathematica
    Do[If[Take[FactorInteger[EulerPhi[2n+1]][[ -1]],1]=={5},Print[2n+1]],{n,1,1000}]

Extensions

Edited by Don Reble, Apr 24 2007
Previous Showing 11-20 of 20 results.