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

A002236 Numbers k such that 9*2^k - 1 is prime.

Original entry on oeis.org

1, 3, 7, 13, 15, 21, 43, 63, 99, 109, 159, 211, 309, 343, 415, 469, 781, 871, 939, 1551, 3115, 3349, 5589, 5815, 5893, 7939, 8007, 11547, 12495, 22555, 23647, 35647, 83415, 103059, 184999, 275859, 384243, 484975, 503893, 828709, 1010277, 1419855, 1481821
Offset: 1

Views

Author

Keywords

Comments

Even exponents can give at most semiprimes (see A181490). - Jeppe Stig Nielsen, Jun 08 2023

References

  • H. Riesel, "Prime numbers and computer methods for factorization," Progress in Mathematics, Vol. 57, Birkhauser, Boston, 1985, Chap. 4, see pp. 381-384.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A050524.

Programs

  • Mathematica
    b=9; i=0; Table[While[i++; cp=b*2^i-1; !PrimeQ[cp]]; i, {j, 1, 22}] (* Lei Zhou, Nov 08 2013 *)
    Select[Range[3400],PrimeQ[9*2^#-1]&] (* The program generates the first 22 terms of the sequence. To generate more, increase the Range constant, but the program may take a long time to run. *) (* Harvey P. Dale, Sep 01 2020 *)
  • PARI
    is(n)=ispseudoprime(9*2^n-1) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 02 2008
a(42)-a(43) communicated by Jeppe Stig Nielsen, Jun 08 2023

A181492 Primes of the form p=3*2^k+1 such that p-2 is also a prime.

Original entry on oeis.org

7, 13, 193, 786433
Offset: 1

Views

Author

M. F. Hasler, Oct 30 2010

Keywords

Comments

Sequence A181490 lists the exponents k, sequences A181491 and A181493 the corresponding lesser twin prime and their average.
a(5) > 3 * 2^3000 + 1. - Max Z. Scialabba, Dec 24 2023

Crossrefs

Programs

  • Mathematica
    Select[3 2^Range[100]+1,And@@PrimeQ[{#,#-2}]&] (* Harvey P. Dale, Jun 19 2013 *)
  • PARI
    for( k=1,999, ispseudoprime(3<
    				

Formula

A181492 = A181491 + 2 = A181493 + 1 = 3*2^A181490 + 1 = intersection of A004119 or A103204 or A181495 with A006512 or A001097.

A181491 Primes of the form p = 3*2^k - 1 such that p+2 is also prime.

Original entry on oeis.org

5, 11, 191, 786431
Offset: 1

Views

Author

M. F. Hasler, Oct 30 2010

Keywords

Comments

Sequence A181490 lists the exponents k, sequences A181492 and A181493 the corresponding upper twin prime and their average.
a(5) > 3 * 2 ^ 3000 + 1. - Max Z. Scialabba, Dec 24 2023

Crossrefs

Programs

  • PARI
    for( k=1,999, ispseudoprime(3<
    				

Formula

A181491 = A007283 intersect A014574 = A181492 - 2 = A181493 - 1 = 3*2^A153890 - 1.

A181493 Numbers of the form 3*2^k which are the average of twin primes, i.e., a(n)-1 and a(n)+1 are both prime.

Original entry on oeis.org

6, 12, 192, 786432
Offset: 1

Views

Author

M. F. Hasler, Oct 30 2010

Keywords

Comments

Sequence A181490 lists the exponents k, sequences A181491 and A181492 the corresponding twin primes.

Crossrefs

Programs

  • Mathematica
    Select[3 2^Range[500],PrimeQ[#-1]&&PrimeQ[#+1]&]  (* Harvey P. Dale, Jan 18 2011 *)
  • PARI
    for( k=1,999, ispseudoprime(3<
    				

Formula

A181493 = A014574 intersect A007283 = A181491 + 1 = A181492 - 1 = 3*2^A181490.
A181493 = A014574 intersect A007283 = A181491 + 1 = A181492.

A275418 Numbers n such that n - 1 has exactly as many odd divisors as n + 1.

Original entry on oeis.org

3, 4, 6, 11, 12, 13, 18, 21, 23, 25, 27, 30, 34, 39, 42, 45, 47, 56, 57, 60, 72, 75, 81, 86, 87, 92, 93, 94, 95, 99, 102, 105, 108, 109, 117, 123, 124, 131, 135, 138, 139, 142, 144, 147, 150, 155, 159, 160, 165, 169, 177, 180, 184, 186, 192, 193, 198, 202, 204, 207, 213, 214, 216
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 27 2016

Keywords

Comments

Numbers n > 1 such that d(2n - 2) + d(n + 1) = d(2n + 2) + d(n - 1) where d = A000005.
Conjectures:
(1) There are only finitely many terms n such that A001227(n - 1) = A001227(n + 1) is odd: 3, 99, 577, 3363, ... (see A276188).
(2) There are only finitely many terms n such that A001227(n - 1) = A001227(n) = A001227(n + 1) = 2: 6, 11, 12, 13, 23, 47, 192, 193, 383, 786432, ... (see also A181490-A181493, A276136).
(3) There are only finitely many prime terms p such that A001227(p - 1) = A001227(p + 1) is prime: 11, 13, 23, 47, 193, 383, 577, ... (see also A275598).
I don't find any more for conjecture #3 up to 10^10. - Charles R Greathouse IV, Aug 22 2016

Examples

			3 is in this sequence because 2 and 4 both have only one odd divisor, 1.
4 is in this sequence because 3 and 5 both have exactly two odd divisors each (1 and 3 for the former, 1 and 5 for the latter).
		

Crossrefs

Programs

  • Magma
    [n: n in [2..216] | NumberOfDivisors(2*(n-1))+ NumberOfDivisors(n+1) eq NumberOfDivisors(2*(n+1))+ NumberOfDivisors(n-1)];
    
  • Maple
    N:= 1000: # to get all terms < N
    nod:= proc(n) numtheory:-tau(n/2^padic:-ordp(n,2)) end proc:
    X:= map(nod,[$1..N]):
    select(t -> X[t+1]=X[t-1], [$2..N-1]); # Robert Israel, Aug 04 2016
  • Mathematica
    f[n_] := Count[Divisors@ n, k_ /; OddQ@ k]; Select[Range[2, 240], f[# - 1] == f[# + 1] &] (* Michael De Vlieger, Jul 28 2016 *)
    Flatten[Position[Partition[Table[Count[Divisors[n],?OddQ],{n,300}],3,1],?(#[[1]]==#[[3]]&),{1},Heads->False]]+1 (* Harvey P. Dale, Nov 02 2016 *)
  • PARI
    a001227(n) = sumdiv(n, d, d%2);
    is(n) = a001227(n-1)==a001227(n+1) \\ Felix Fröhlich, Jul 27 2016
    
  • PARI
    is(n)=numdiv((n-1)>>valuation(n-1,2)) == numdiv((n+1)>>valuation(n+1,2)) \\ Charles R Greathouse IV, Jul 29 2016

Extensions

Name edited by Alonso del Arte, Aug 23 2016

A276136 Numbers m > 1 such that the largest odd divisors of m-1, m, and m+1 are prime.

Original entry on oeis.org

6, 11, 12, 13, 23, 47, 192, 193, 383, 786432
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 22 2016

Keywords

Comments

Conjecture: this sequence is finite.
Any further terms are greater than 10^11. - Charles R Greathouse IV, Aug 22 2016
From Robert Israel, Apr 27 2020: (Start)
Each term is either of the form 3*2^k with 3*2^k-1 and 3*2^k+1 prime, or 3*2^k-1 with 3*2^k-1 prime and 3*2^(k-1)-1 prime, or 3*2^k+1 with 3*2^k+1 prime and 3*2^(k-1)+1 prime.
Any further terms > 10^2000.
(End)

Examples

			6 is in this sequence because the largest odd divisor of 5 is 5, the largest odd divisor of 6 is 3 and the largest odd divisor of 7 is 7, and all three are prime.
		

Crossrefs

Supersequence of A181493. Subsequence of A038550.

Programs

  • Magma
    [n: n in [2..3000000] | NumberOfDivisors(2*(n-1))- NumberOfDivisors(n-1)eq 2 and NumberOfDivisors(2(n))-NumberOfDivisors(n) eq 2 and NumberOfDivisors(2*(n+1))- NumberOfDivisors(n+1) eq 2];
    
  • Maple
    Res:= 6:
    for k from 2  while length(3*2^k-1)<1000 do
      if (isprime(3*2^k-1) and isprime(3*2^(k-1)-1)) then Res:= Res, 3*2^k-1
        fi;
      if (isprime(3*2^k-1) and isprime(3*2^k+1)) then Res:= Res, 3*2^k;
        fi;
      if (isprime(3*2^k+1) and isprime(3*2^(k-1)+1)) then Res:= Res, 3*2^k+1;
        fi;
    od:
    Res; # Robert Israel, Apr 27 2020
  • Mathematica
    Select[Range[2, 10^6], Function[n, Times @@ Boole@ PrimeQ@ Map[First@ Reverse@ DeleteCases[Divisors@ #, d_ /; EvenQ@ d] &, n + Range[-1, 1]] == 1]] (* Michael De Vlieger, Aug 22 2016 *)
    SequencePosition[Table[If[PrimeQ[Max[Select[Divisors[n],OddQ]]],1,0],{n,800000}],{1,1,1}][[;;,1]]+1 (* Harvey P. Dale, Jun 27 2023 *)
  • PARI
    isA038550(n)=isprime(n>>valuation(n,2))
    is(n)=isA038550(n-1) && isA038550(n) && isA038550(n+1) \\ Charles R Greathouse IV, Aug 22 2016
    
  • PARI
    forprime(p=2,1e11, my(a=isA038550(p-1),b=isA038550(p+1)); if(a && isA038550(p-2), print1(p-1", ")); if(a && b, print1(p", ")); if(b && isA038550(p+2), print1(p+1", "))) \\ may print numbers several times, but won't skip numbers; Charles R Greathouse IV, Aug 22 2016

Formula

A038550(a(n-1)) + 1 = A038550(a(n)) = A038550(a(n+1)) - 1.
a(n) >> n log n. - Charles R Greathouse IV, Aug 22 2016

A092679 Numbers k such that 3*2^k has only one anti-divisor.

Original entry on oeis.org

0, 1, 5, 17
Offset: 1

Views

Author

Lior Manor, Mar 03 2004

Keywords

Comments

Next term should be greater than 3*10^6 (cf. A181490).
See A066272 for definition of anti-divisor.

Crossrefs

Programs

  • Python
    A092679 = [i for i,n in enumerate(map(lambda x:3*2**x,range(20))) if len([d for d in range(2,n,2) if n%d and not 2*n%d]+[d for d in range(3,n,2) if n%d and 2*n%d in [d-1,1]])==1] # Chai Wah Wu, Aug 09 2014

Formula

A092680(n) = 3*2^a(n).
a(n) = A181490(n) - 1. - Max Alekseyev, Feb 14 2025

A092680 Numbers of the form 3*2^k with a single anti-divisor.

Original entry on oeis.org

3, 6, 96, 393216
Offset: 1

Views

Author

Lior Manor, Mar 03 2004

Keywords

Comments

See A066272 for definition of anti-divisor.
If it exists, a(5) > 3*2^(1000). See A092679. - J.W.L. (Jan) Eerland, Nov 13 2022

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy.ntheory.factor_ import antidivisor_count
    def A092680_gen(): return filter(lambda n: antidivisor_count(n)==1,(3*2**k for k in count(0)))
    A092680_list = list(islice(A092680_gen(),4)) # Chai Wah Wu, Jan 04 2022

Formula

a(n) = 3*2^A092679(n).
a(n) = 3*2^(A181490(n)-1) = (A181491(n)+1)/2 = (A181492(n)-1)/2. - Max Alekseyev, Feb 14 2025

A181494 Twin primes (A001097) of the form 3*2^k +- 1.

Original entry on oeis.org

5, 7, 11, 13, 191, 193, 786431, 786433
Offset: 1

Views

Author

M. F. Hasler, Oct 30 2010

Keywords

Crossrefs

Programs

  • PARI
    for( k=1,999, ispseudoprime(3<
    				

Formula

A181494(n) = A181493(ceiling(n/2)) + (-1)^n = A007283(A181490(ceiling(n/2))) + (-1)^n.

A294730 Smallest average >= 6 of a twin prime pair that has exactly 2*n divisors, 0 if no such pair exists.

Original entry on oeis.org

6, 12, 30, 0, 60, 192, 270, 180, 240, 0, 420, 0, 2112, 1620, 1320, 0, 2340, 786432, 3120, 4800, 15360, 0, 3360, 388962, 724992, 6300, 29760, 0, 12240, 0, 7560, 617472, 47382528, 81648, 21600, 0, 651952128, 995328, 21840, 0, 33600, 0, 138240
Offset: 2

Views

Author

Hugo Pfoertner, Nov 08 2017

Keywords

Comments

It is conjectured that a(n)=0 for prime n with the only exceptions given by n=A181490(k)+1, i.e. a(2)=6, a(3)=12, a(7)=192 and a(19)=786432 are the only currently known exceptions.

Crossrefs

Showing 1-10 of 12 results. Next