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 26 results. Next

A144755 Primes which divide none of overpseudoprimes to base 2 (A141232).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 31, 41, 43, 73, 127, 151, 241, 257, 331, 337, 683, 2731, 5419, 8191, 43691, 61681, 65537, 87211, 131071, 174763, 262657, 524287, 599479, 2796203, 15790321, 18837001, 22366891, 715827883, 2147483647, 4278255361
Offset: 1

Views

Author

Vladimir Shevelev, Sep 20 2008

Keywords

Comments

Odd prime p is in the sequence iff A064078(A002326((p-1)/2))=p. For example, for p=127 we have A002326((127-1)/2)=7 and A064078(7)=127. Thus p=127 is in the sequence.
Primes p such that the binary expansion of 1/p has a unique period length; that is, no other prime has the same period. Sequence A161509 sorted. - T. D. Noe, Apr 13 2010
Since A161509 has terms of varying magnitude, sorting any finite initial segment of A161509 cannot provide a guarantee that there are no other terms missed in between. Any prime p not (yet) appearing in A161509 should be tested via A064078(A002326((p-1)/2))=p to conclude whether it belongs to the current sequence. - Max Alekseyev, Feb 10 2024

Examples

			Overpseudoprimes to base 2 are odd, then a(1)=2.
		

Crossrefs

Cf. A040017 (unique-period primes in base 10). - T. D. Noe, Apr 13 2010

Programs

  • Mathematica
    b=2; t={}; Do[c=Cyclotomic[n,b]; q=c/GCD[n,c]; If[PrimePowerQ[q], p=FactorInteger[q][[1,1]]; If[p<10^12, AppendTo[t,p]; Print[{n,p}]]], {n,1000}]; t=Sort[t] (* T. D. Noe, Apr 13 2010 *)
  • PARI
    { is_a144755(p) = my(q,m,g); q=znorder(Mod(2,p)); m=2^q-1; fordiv(q,d, if(d1,m\=g))); m==p; } \\ Max Alekseyev, Feb 10 2024

Extensions

Extended by T. D. Noe, Apr 13 2010
b-file deleted by Max Alekseyev, Feb 10 2024.

A122929 Multiplicative order of 2 mod A141232(n).

Original entry on oeis.org

11, 28, 36, 52, 48, 60, 52, 148, 76, 68, 51, 52, 29, 92, 156, 92, 29, 179, 166, 100, 44, 102, 239, 156, 50, 25, 51, 364, 224, 204, 244, 166, 66, 346, 194, 388, 618, 92, 388, 102, 660, 371, 388, 29, 772, 828, 239, 460, 55, 292, 431, 166, 882, 1060, 532, 155, 68
Offset: 1

Views

Author

Vladimir Shevelev, Jul 05 2008, Jul 12 2008, Jul 23 2008

Keywords

Crossrefs

Programs

  • PARI
    a137576(n)=my(t); sumdiv(2*n+1, d, eulerphi(d)/(t=znorder(Mod(2, d))))*t-t+1;
    lista(nn) = {forcomposite(n=1, nn, if ((n % 2) && (a137576((n-1)/2) == n), print1(znorder(Mod(2, n)), ", ");););} \\ Michel Marcus, Feb 09 2015

Extensions

More terms from Michel Marcus, Feb 09 2015

A352987 Carmichael numbers (A002997) that are overpseudoprimes to base 2 (A141232).

Original entry on oeis.org

65700513721, 168003672409, 459814831561, 13685652197857, 34477679139751, 74031531351121, 92327722290241, 206175669172201, 704077371354601, 1882982959757929, 2901482064497017, 3715607011189609, 5516564718607489, 5636724028491697, 6137426373439681, 14987802403246609
Offset: 1

Views

Author

Daniel Suteu, May 06 2022

Keywords

Comments

If we define f(n) to be the smallest number in the sequence with n prime factors, then we have:
f(3) = 65700513721,
f(4) <= 84286331493236478328609,
f(5) <= 3848515708338676403444146123852434164444641.

Crossrefs

Intersection of A002997 and A141232.
Intersection of A291637 and A141232.

A353409 Smallest overpseudoprime to base 2 (A141232) with n distinct prime factors.

Original entry on oeis.org

2047, 13421773, 14073748835533
Offset: 2

Views

Author

Daniel Suteu, May 07 2022

Keywords

Comments

a(5) > 2^64.
a(5) <= 1376414970248942474729,
a(6) <= 48663264978548104646392577273,
a(7) <= 294413417279041274238472403168164964689,
a(8) <= 98117433931341406381352476618801951316878459720486433149,
a(9) <= 1252977736815195675988249271013258909221812482895905512953752551821.

Crossrefs

A164368 Primes p with the property: if q is the smallest prime > p/2, then a prime exists between p and 2q.

Original entry on oeis.org

2, 11, 17, 29, 41, 47, 59, 67, 71, 97, 101, 107, 109, 127, 137, 149, 151, 167, 179, 181, 191, 197, 227, 229, 233, 239, 241, 263, 269, 281, 283, 307, 311, 347, 349, 367, 373, 401, 409, 419, 431, 433, 439, 461, 487, 491, 503, 521, 569, 571, 587, 593, 599, 601, 607
Offset: 1

Views

Author

Vladimir Shevelev, Aug 14 2009

Keywords

Comments

The Ramanujan primes possess the following property:
If p = prime(n) > 2, then all numbers (p+1)/2, (p+3)/2, ..., (prime(n+1)-1)/2 are composite.
The sequence equals all primes with this property, whether Ramanujan or not.
All Ramanujan primes A104272 are in the sequence.
Every lesser of twin primes (A001359), beginning with 11, is in the sequence. - Vladimir Shevelev, Aug 31 2009
109 is the first non-Ramanujan prime in this sequence.
A very simple sieve for the generation of the terms is the following: let p_0=1 and, for n>=1, p_n be the n-th prime. Consider consecutive intervals of the form (2p_n, 2p_{n+1}), n=0,1,2,... From every interval containing at least one prime we remove the last one. Then all remaining primes form the sequence. Let us demonstrate this sieve: For p_n=1,2,3,5,7,11,... consider intervals (2,4), (4,6), (6,10), (10,14), (14,22), (22,26), (26,34), ... . Removing from the set of all primes the last prime of each interval, i.e., 3,5,7,13,19,23,31,... we obtain 2,11,17,29, etc. - Vladimir Shevelev, Aug 30 2011
This sequence and A194598 are the mutually wrapping up sequences:
A194598(1) <= a(1) <= A194598(2) <= a(2) <= ...
From Peter Munn, Oct 30 2017: (Start)
The sequence is the list of primes p = prime(k) such that there are no primes between prime(k)/2 and prime(k+1)/2. Changing "k" to "k-1" and therefore "k+1" to "k" produces a definition very similar to A164333's: it differs by prefixing an initial term 3. From this we get a(n+1) = prevprime(A164333(n)) = A151799(A164333(n)) for n >= 1.
The sequence is the list of primes that are not the largest prime less than 2*prime(k) for any k, so that - as a set - it is the complement relative to A000040 of the set of numbers in A059788.
{{2}, A166252, A166307} is a partition.
(End)

Examples

			2 is in the sequence, since then q=2, and there is a prime 3 between 2 and 4. - _N. J. A. Sloane_, Oct 15 2009
		

Crossrefs

Cf. Ramanujan primes, A104272, and related sequences: A164288, A080359, A164294, A193507, A194184, A194186.
A001359, A166252, A166307 are subsets.
Cf. A001262, A001567, A062568, A141232 (all relate to pseudoprimes to base 2).

Programs

  • Maple
    a:= proc(n) option remember; local q, k, p;
          k:= nextprime(`if`(n=1, 1, a(n-1)));
          do q:= nextprime(floor(k/2));
             p:= nextprime(k);
             if p<2*q then break fi;
             k:= p
          od; k
        end:
    seq(a(n), n=1..55);  # Alois P. Heinz, Aug 30 2011
  • Mathematica
    Reap[Do[q=NextPrime[p/2]; If[PrimePi[2*q] != PrimePi[p], Sow[p]], {p, Prime[Range[100]]}]][[2, 1]]
    (* Second program: *)
    fQ[n_] := PrimePi[ 2NextPrime[n/2]] != PrimePi[n];
    Select[ Prime@ Range@ 105, fQ]
  • PARI
    is(n)=nextprime(n+1)<2*nextprime(n/2) && isprime(n) \\ Charles R Greathouse IV, Apr 24 2015

Formula

As a set, this sequence = A000040 \ A059788 = A000040 \ prevprime(2*A000040) = A000040 \ A151799(A005843(A000040)). - Peter Munn, Oct 30 2017

Extensions

Definition clarified and simplified by Jonathan Sondow, Oct 25 2011

A164288 Members of A164368 which are not Ramanujan primes.

Original entry on oeis.org

109, 137, 191, 197, 283, 521, 617, 683, 907, 991, 1033, 1117, 1319, 1493, 1619, 1627, 1697, 1741, 1747, 1801, 1931, 1949, 2011, 2111, 2143, 2153, 2293, 2417, 2539, 2543, 2549, 2591, 2621, 2837, 2927, 2953, 2969, 3079, 3119, 3187, 3203, 3329, 3389, 3407
Offset: 1

Views

Author

Vladimir Shevelev, Aug 12 2009

Keywords

Comments

Every lesser of twin primes (A001359), beginning with 137, which is not in A104272, is in the sequence. [From Vladimir Shevelev, Aug 31 2009]

Examples

			p=137 is the least lesser of twin primes which is not a Ramanujan prime. Therefore it is in the sequence. [From _Vladimir Shevelev_, Aug 31 2009]
		

Crossrefs

Programs

  • Mathematica
    nn = 250;
    A164368 = Select[Prime[Range[2 nn]], PrimePi[2 NextPrime[#/2]] != PrimePi[#]&];
    Rama = Table[0, {nn}]; s = 0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, Rama[[s+1]] = k], {k, Prime[3 nn]}];
    A104272 = Rama+1;
    Complement[A164368, A104272] (* Jean-François Alcover, Oct 27 2018, after T. D. Noe in A104272 *)

Formula

Extensions

I added 521. - Vladimir Shevelev, Aug 17 2009
Redefined in terms of A164368 and extended by R. J. Mathar, Aug 18 2009

A064078 Zsigmondy numbers for a = 2, b = 1: Zs(n, 2, 1) is the greatest divisor of 2^n - 1 (A000225) that is coprime to 2^m - 1 for all positive integers m < n.

Original entry on oeis.org

1, 3, 7, 5, 31, 1, 127, 17, 73, 11, 2047, 13, 8191, 43, 151, 257, 131071, 19, 524287, 41, 337, 683, 8388607, 241, 1082401, 2731, 262657, 3277, 536870911, 331, 2147483647, 65537, 599479, 43691, 8727391, 4033, 137438953471, 174763, 9588151, 61681
Offset: 1

Views

Author

Jens Voß, Sep 04 2001

Keywords

Comments

By Zsigmondy's theorem, the n-th Zsigmondy number for bases a and b is not 1 except in the three cases (1) a = 2, b = 1, n = 1, (2) a = 2, b = 1, n = 6, (3) n = 2 and a + b is a power of 2.
Composite terms are the maximal overpseudoprimes to base 2 (see A141232) for which the multiplicative order of 2 mod a(n) equals n. - Vladimir Shevelev, Aug 26 2008
a(n) = 2^n - 1 if and only if either n = 1 or n is prime. - Vladimir Shevelev, Sep 30 2008
a(n) == 1 (mod n), 2^(a(n)-1) == 1 (mod a(n)), A002326((a(n)-1)/2) = n. - Thomas Ordowski, Oct 25 2017
If n is odd, then the prime factors of a(n) are congruent to {1,7} mod 8, that is, they have 2 has a quadratic residue, and are congruent to 1 mod 2n. If n is divisible by 8, then the prime factors of a(n) are congruent to 1 mod 16. - Jianing Song, Apr 13 2019
Named after the Austrian mathematician Karl Zsigmondy (1867-1925). - Amiram Eldar, Jun 20 2021

Examples

			a(4) = 5 because 2^4 - 1 = 15 and its divisors being 1, 3, 5, 15, only 1 and 5 are coprime to 2^2 - 1 = 3 and 2^3 - 1 = 7, and 5 is the greater of these.
a(5) = 31 because 2^5 - 1 = 31 is prime.
a(6) = 1 because 2^6 - 1 = 63 and its divisors being 1, 3, 7, 9, 21, 63, only 1 is coprime to all of 3, 7, 15, 31.
		

Crossrefs

Programs

  • Mathematica
    Table[Cyclotomic[n, 2]/GCD[n, Cyclotomic[n, 2]], {n, 40}] (* Alonso del Arte, Mar 14 2013 *)
  • PARI
    a(n) = my(m = polcyclo(n, 2)); m/gcd(m,n); \\ Michel Marcus, Mar 07 2015

Formula

Denominator of Sum_{d|n} d*moebius(n/d)/(2^d-1). - Vladeta Jovovic, Apr 02 2004
a(n) = A019320(n)/gcd(n, A019320(n)). - T. D. Noe, Apr 13 2010
a(n) = A019320(n)/(A019320(n) mod n) for n > 1. - Thomas Ordowski, Oct 24 2017

Extensions

More terms from Vladeta Jovovic, Apr 02 2004
Definition corrected by Jerry Metzger, Nov 04 2009

A164294 Primes prime(k) such that all integers in [(prime(k-1)+1)/2,(prime(k)-1)/2] are composite, excluding those primes in A080359.

Original entry on oeis.org

131, 151, 229, 233, 311, 571, 643, 727, 941, 1013, 1051, 1153, 1373, 1531, 1667, 1669, 1723, 1783, 1787, 1831, 1951, 1979, 2029, 2131, 2213, 2239, 2311, 2441, 2593, 2621, 2633, 2659, 2663, 2887, 3001, 3011, 3019, 3121, 3169, 3209, 3253, 3347, 3413, 3457
Offset: 1

Views

Author

Vladimir Shevelev, Aug 12 2009

Keywords

Comments

The primes of A080359 larger than 3 all have the property that the integers in the interval selected by halving the value of the preceding prime and halving their own value are all composite. This sequence here collects the primes that are not in A080359 but still share this property of the prime-free subinterval.

Examples

			For the prime 1531=A000040(242), the preceding prime is A000040(241)=1523, and the integers from (1523+1)/2 = 762 up to (1531-1)/2 = 765 are all composite, as they fall in the gap between A000040(135) and A000040(136). In addition, 1531 is not in A080359, which adds 1531 to this sequence here.
		

Crossrefs

Programs

  • Mathematica
    maxPrime = 3500;
    kmax = PrimePi[maxPrime];
    A164333 = Select[Table[{(Prime[k - 1] + 1)/2, (Prime[k] - 1)/2}, {k, 3, kmax}], AllTrue[Range[#[[1]], #[[2]]], CompositeQ] &][[All, 2]]*2 + 1;
    b[1] = 2; b[n_] := b[n] = Module[{k = b[n - 1]}, While[(PrimePi[k] - PrimePi[Quotient[k, 2]]) != n, k++]; k];
    A080359 = Reap[For[n = 1, b[n] <= maxPrime, n++, Sow[b[n]]]][[2, 1]];
    Complement[A164333, A080359] (* Jean-François Alcover, Sep 14 2018 *)
  • PARI
    okprime(p) = { my(k = primepi(p)); for (i = (prime(k-1)+1)/2, (prime(k)-1)/2, if (isprime(i), return (0));); return (1);}
    lista(nn) = {vlp = readvec("b080359.txt"); forprime (p=2, nn, if (! vecsearch(vlp, p) && okprime(p), print1(p, ", ")););} \\ Michel Marcus, Jan 15 2014

Formula

Extensions

Extended beyond 571 by R. J. Mathar, Oct 02 2009

A137576 a(n) = A002326(n) * A006694(n) + 1.

Original entry on oeis.org

1, 3, 5, 7, 13, 11, 13, 17, 17, 19, 31, 23, 41, 55, 29, 31, 41, 61, 37, 49, 41, 43, 85, 47, 85, 57, 53, 81, 73, 59, 61, 73, 73, 67, 111, 71, 73, 141, 151, 79, 217, 83, 89, 113, 89, 109, 131, 145, 97, 211, 101, 103, 169, 107, 109, 145, 113, 221, 133, 193, 221, 141, 301, 127
Offset: 0

Views

Author

Vladimir Shevelev, Apr 26 2008, Apr 28 2008, May 03 2008, Jun 12 2008

Keywords

Comments

Composite numbers n for which a((n-1)/2)=n are called overpseudoprimes to base 2 (A141232).
Theorem. If p and q are odd primes then the equality a((pq-1)/2)=pq is valid if and only if A002326((p-1)/2)=A002326((q-1)/2). Example: A002326(11) = A002326(44). Since 23 and 89 are primes then a((23*89-1)/2)=23*89.
A generalization: If p_1A002326((p_1-1)/2)= A002326((p_2-1)/2)=...=A002326((p_m-1)/2).
Moreover, if n is an odd squarefree number and a((n-1)/2)=n then also all divisors d of n satisfy a((d-1)/2)=d and d divides 2^d-2. Thus the sequence of such n is a subsequence of A050217.

Crossrefs

Programs

  • Mathematica
    a[n_] := (t = MultiplicativeOrder[2, 2n+1])*DivisorSum[2n+1, EulerPhi[#] / MultiplicativeOrder[2, #]&]-t+1; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Dec 04 2015, adapted from PARI *)
  • PARI
    a(n)=my(t);sumdiv(2*n+1, d, eulerphi(d)/(t=znorder(Mod(2, d))))*t-t+1 \\ Charles R Greathouse IV, Feb 20 2013

Formula

It can be shown that if p is an odd prime then a((p^k-1)/2)=1+k*phi(p^k).
a(n) = ord(2,2*n+1) * ((Sum_{d|(2n+1)} phi(d)/ord(2,d)) - 1) + 1, where phi = A000010 and ord(2,d) is the multiplicative order of 2 modulo d. - Jianing Song, Nov 13 2021

Extensions

Edited and extended by Ray Chandler, May 08 2008

A164333 Primes prime(k) such that all integers in the interval [(prime(k-1)+1)/2, (prime(k)-1)/2] are composite numbers.

Original entry on oeis.org

13, 19, 31, 43, 53, 61, 71, 73, 101, 103, 109, 113, 131, 139, 151, 157, 173, 181, 191, 193, 199, 229, 233, 239, 241, 251, 269, 271, 283, 293, 311, 313, 349, 353, 373, 379, 409, 419, 421, 433, 439, 443, 463, 491, 499, 509, 523, 571, 577, 593, 599, 601, 607, 613, 619, 643
Offset: 1

Views

Author

Vladimir Shevelev, Aug 13 2009

Keywords

Comments

Let p_k be the k-th prime. A prime p is in the sequence iff the interval of the form (2p_k, 2p_(k+1)), containing p, also contains a prime less than p. The sequence is connected with the following classification of primes: the first two primes 2,3 form a separate set of primes; let p >= 5 be in the interval (2p_k, 2p_(k+1)), then 1) if in this interval there are only primes greater than p, then p is called a right prime; 2) if in this interval there are only primes less than p, then p is called a left prime; 3) if in this interval there are primes both greater and less than p, then p is called a central prime; 4) if this interval does not contain other primes, then p is called an isolated prime. In particular, the right primes form sequence A166307, and all Ramanujan primes (A104272) greater than 2 are either right or central primes; the left primes form sequence A182365, and all Labos primes (A080359) greater than 3 are either left or central primes; the central primes form A166252 and the isolated primes form A166251. [Vladimir Shevelev, Oct 10 2009] [Sequence reference updated by Peter Munn, Jun 01 2023]
Disjoint union of A166252 and A182365. - Peter Munn, Jun 01 2023 [an edited version of a contribution by Vladimir Shevelev in 2009]

Examples

			Let p=53. We see that 2*23<53<2*29. Since the interval (46, 58) contains prime 47<53 and does not contain any prime more than 53, then, by the considered classification 53 is left prime and it is in the sequence. [_Vladimir Shevelev_, Oct 10 2009]
		

Crossrefs

Programs

  • Maple
    isA164333 := proc(n)
            local i ;
            if isprime(n) and n > 3 then
                    for i from (prevprime(n)+1)/2 to (n-1)/2 do
                            if isprime(i) then
                                    return false;
                            end if;
                    end do;
                    return true;
            else
                    false;
            end if;
    end proc:
    for i from 2 to 700 do
            if isA164333(i) then
                    printf("%d,",i);
            end if;
    end do: # R. J. Mathar, Oct 29 2011
  • Mathematica
    kmax = 200; Select[Table[{(Prime[k - 1] + 1)/2, (Prime[k] - 1)/2}, {k, 3, kmax}], AllTrue[Range[#[[1]], #[[2]]], CompositeQ]&][[All, 2]]*2 + 1 (* Jean-François Alcover, Nov 14 2017 *)

Formula

{A080359} union {A164294} = {this sequence} union {2,3}. - Vladimir Shevelev, Oct 29 2011
A164368(2)A164368(3)A164368(4)Vladimir Shevelev, Oct 10 2009]

Extensions

Definition rephrased by R. J. Mathar, Oct 02 2009
Showing 1-10 of 26 results. Next