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 21-30 of 47 results. Next

A228028 Primes of the form 5^n + 4.

Original entry on oeis.org

5, 29, 15629, 9765629
Offset: 1

Views

Author

Vincenzo Librandi, Aug 11 2013

Keywords

Crossrefs

Cf. A124621 (associated n).
Cf. Primes of the form k^n + h: A092506 (k=2, h=1), A057733 (k=2, h=3), A123250 (k=2, h=5), A104066 (k=2, h=7), A104070 (k=2, h=9), A057735 (k=3, h=2), A102903 (k=3, h=4), A102870 (k=3, h=8), A102907 (k=3, h=10), A290200 (k=4, h=1), A228027 (k=4, h=9), A182330 (k=5, h=2), this sequence (k=5, h=4), A228029 (k=5, h=6), A102910 (k=5, h=8), A182331 (k=6, h=1), A104118 (k=6, h=5), A104115 (k=6, h=7), A104065 (k=7, h=4), A228030 (k=7, h=6), A228031 (k=7, h=10), A228032 (k=8, h=3), A228033 (k=8, h=5), A144360 (k=8, h=7), A145440 (k=8, h=9), A228034 (k=9, h=2), A159352 (k=10, h=3), A159031 (k=10, h=7).

Programs

  • Magma
    [a: n in [0..200] | IsPrime(a) where a is  5^n+4];
  • Mathematica
    Select[Table[5^n + 4, {n, 0, 200}], PrimeQ]

Extensions

Corrected cross-references - Robert Price, Aug 01 2017

A269018 Primes p of the form 2^k + 2*(-1)^k - 1.

Original entry on oeis.org

2, 5, 17, 29, 257, 509, 65537, 536870909, 13164036458569648337239753460458804039861886925068638906788872189, 3369993333393829974333376885877453834204643052817571560137951281149, 13803492693581127574869511724554050904902217944340773110325048447598589
Offset: 1

Views

Author

Jaroslav Krizek, Feb 17 2016

Keywords

Comments

Corresponding values of k: 0, (2, 3), 4, 5, 8, 9, 16, 29, 213, 221, 233, ...; for the prime 5 there are two values: 2 and 3.
Fermat primes > 3 from A019434 are terms.
Prime terms from A269019.
Conjecture: union of {2}, {A019434(n) for n > 1} and {A176680(n)}.
a(16) > 2^16000 if it exists. - Robert Israel, Nov 11 2022
a(16) = 2^20757 - 3, a(17) = 2^30041 - 3. a(18) > 2^40000, if it exists. - Jon E. Schoenfield, Nov 11 2022

Crossrefs

Programs

  • Magma
    Set(Sort([2^n + 2*(-1)^n - 1: n in [0..300] | IsPrime(2^n + 2*(-1)^n - 1)]))
  • Maple
    Res:= 2,5: count:= 2:
    for n from 4 while count < 15 do
       x:= 2^n + 2*(-1)^n - 1;
       if isprime(x) then Res:= Res,x; count:= count+1  fi;
    od:
    Res; # Robert Israel, Nov 11 2022

A277994 Number of unordered integer pairs of the form {k | n, (k + 2^m) | n}, where k >= 1, m >= 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 0, 3, 2, 3, 0, 8, 0, 1, 3, 4, 1, 6, 0, 6, 2, 1, 0, 12, 1, 1, 2, 2, 0, 9, 0, 5, 3, 3, 2, 11, 0, 1, 1, 9, 0, 7, 0, 2, 5, 1, 0, 16, 0, 3, 2, 2, 0, 6, 1, 4, 2, 1, 0, 17, 0, 1, 4, 6, 3, 8, 0, 5, 1, 5, 0, 17, 0, 1, 3, 2, 1, 4, 0, 12, 2, 1, 0, 13, 2
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 07 2016

Keywords

Comments

Number of power-two-difference-divisor pairs of n.

Examples

			The positive divisors of 10 are 1, 2, 5, 10. Of these, {1 | 10, (1 + 2^0) | 10} = {1, 2}, {1 | 10, (1 + 2^2) | 10} = {1, 5}, {2 | 10, (2 + 2^3) | 10} = {2, 10}. So a(10) = 3.
		

Crossrefs

Programs

  • Maple
    f:=proc(n) local D,k;
      D:= numtheory:-divisors(n);
      add(nops(D intersect map(`+`,D,2^k)), k=0..ilog2(n-1));
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 08 2016
  • Mathematica
    f[n_] := Module[{dd = Divisors[n], k}, Sum[Length[dd ~Intersection~ (dd + 2^k)], {k, 0, Log[2, n - 1]}]];
    Array[f, 100] (* Jean-François Alcover, Jul 29 2020, after Robert Israel *)

Formula

Dirichlet g.f.: zeta(s) Sum_{k>=0} Sum_{m>=1} 1/lcm(m, m+2^k)^s. - Robert Israel, Nov 08 2016
a(2^n) = n, a(A092506(n)) = 1.

Extensions

Corrected by Robert Israel, Nov 08 2016

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

A286268 Totient superabundant numbers: numbers n such that A092693(n)/n > A092693(m)/m for all m < n.

Original entry on oeis.org

1, 2, 3, 5, 11, 17, 83, 137, 257, 2879, 46049, 65537
Offset: 1

Views

Author

Amiram Eldar, May 05 2017

Keywords

Comments

Analogous to A004394 (superabundant numbers) as A082897 (perfect totient numbers) is analogous to A000396 (perfect numbers).
The first 6 terms of A092506 (primes of the form 2^n + 1) are in this sequence.
a(13) > 1.6*10^10, if it exists. - Giovanni Resta, May 05 2017

Crossrefs

Programs

  • Mathematica
    Function[s, Flatten[First@ Position[s, #] & /@ Union@ Rest@ FoldList[Max, 0, s]]]@ Table[(Total@ FixedPointList[EulerPhi, n] - (n + 1))/n, {n, 10^5}] (* Michael De Vlieger, May 06 2017, after Alonso del Arte at A092693 *)

A291049 Primes of the form 2^r * 17^s + 1.

Original entry on oeis.org

2, 3, 5, 17, 137, 257, 65537, 157217, 295937, 557057, 1336337, 96550277, 1212153857, 2281701377, 5473632257, 395469930497, 1401249857537, 2637646790657, 4964982194177, 28572702478337, 1271035441709057, 38280596832649217, 1872540629620228097, 6634884445436379137
Offset: 1

Views

Author

Muniru A Asiru, Sep 15 2017

Keywords

Comments

Primes of the forms a^r * b^s + 1 where (a, b) = (2,1), (2,3), (2,5), (2,7), (2,11) and (2,13) are A092506, A005109, A077497, A077498, A077499 and A173236.
Fermat prime exponents r are 0, 1, 2, 4, 8, 16.
For n > 2, all terms are congruent to 5 (mod 6).
Also, these are prime numbers p for which (p*34^p)/(p-1) is an integer.

Examples

			With n = 1, a(1) = 2^0 * 17^0 + 1 = 2.
With n = 5, a(5) = 2^3 * 17^1 + 1 = 137.
list of (r,s): (0,0), (1,0), (2,0), (4,0), (3,1), (8,0), (16,0), (5,3), (10,2), (15,1), (4,4), (2,6).
		

Crossrefs

Cf. Sequences of primes of form 2^n * q^u + 1: A092506 (q=1), A005109 (q=3), A077497 (q=5), A077498 (q=7), A077499 (q=11), A173236 (q=13).

Programs

  • GAP
    K:=26*10^7+1;; # to get all terms <= K.
    A:=Filtered(Filtered([1,3..K],i-> i mod 6=5),IsPrime);;    I:=[17];;
    B:=List(A,i->Elements(Factors(i-1)));;
    C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));;
    A291049:=Concatenation([2,3],List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])],j->Positions(B,C[i][j]))))),i->A[i]));
    
  • Maple
    N:= 10^20: # to get all terms <= N+1
    S:= NULL:
    for r from 0 to ilog2(N) do
      for s from 0 to floor(log[17](N/2^r)) do
        p:= 2^r*17^s +1;
        if isprime(p) then
         S:= S, p
        fi
    od od:
    sort([S]); # Robert Israel, Sep 26 2017
  • Mathematica
    With[{nn = 10^19, q = 17}, Select[Sort@ Flatten@ Table[2^i*q^j + 1, {i, 0, Log[2, nn]}, {j, 0, Log[q, nn/2^i]}], PrimeQ]] (* Michael De Vlieger, Sep 18 2017, after Robert G. Wilson v at A005109 *)
  • PARI
    lista(nn) = my(t, v=List([])); for(r=0, logint(nn, 2), t=2^r; for(s=0, logint(nn\t, 17), if(isprime(t+1), listput(v, t+1)); t*=17)); Vec(vecsort(v)) \\ Jinyuan Wang, Jun 26 2022

A122912 Smallest prime of the form (k^2 * 2^n + 1).

Original entry on oeis.org

3, 5, 73, 17, 1153, 257, 1153, 257, 18433, 25601, 18433, 65537, 1179649, 65537, 1179649, 65537, 1179649, 26214401, 117964801, 26214401, 169869313, 104857601, 2717908993, 10485760001, 2717908993, 11341398017, 10871635969, 52613349377
Offset: 1

Views

Author

Alexander Adamchuk, Sep 18 2006

Keywords

Comments

It is interesting to note a pattern such that for many n a(n) = a(n+2) and a(n+1) = a(n+3). The first such double twin pair run starts at n = 5, a(5) = a(7) = 1153 and a(6) = a(8) = 257. The first triple twin pair run starts at n = 12, a(12) = a(14) = a(16) = 65537 and a(13) = a(15) = a(17) = 1179649. There are longer runs of twin pairs such as penta twin pair run starting at n = 55, a(55) = a(57) = a(59) = a(61) = a(63) = 83010348331692982273 and a(56) = a(58) = a(60) = a(62) = a(64) = 461168601842738790401. A run of six twins starts at n = 71, a(71) = a(73) = a(75) = a(77) = a(79) = a(81) = 21760664753063325144711169. The final index of many twin runs is a perfect power such as {8,16,64,81,...}. Corresponding minimum numbers k such that (k^2*2^n + 1) is prime are listed in A122913[n] = { 1,1,3,1,6,2,3,1,6,5, 3,4,12,2,6,1,3,10,15,5, 9,5,18,25,9,13,9,14,12,7, 6,9,3,17,9,9,15,12,9,6, 6,3,3,11,42,18,21,9,66,10, 33,5,27,7,48,80,24,40,12,20, 6,10,3,5,3,7,3,79,75,63, 96,40,48,20,24,10,12,5,6,15, 3,22,72,11,36,15,18,25,9,57, 21,44,33,22,93,11,366,38,183,19,...}.

Crossrefs

A128898 Primes of form 2^j + 2^k - 1 or 2^j + 2^k + 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 37, 41, 47, 67, 71, 73, 79, 97, 127, 131, 137, 191, 193, 257, 263, 271, 383, 521, 577, 641, 769, 1031, 1033, 1039, 1087, 1151, 1153, 1279, 2053, 2063, 2081, 2111, 2113, 4099, 4111, 4127, 4129, 4159, 5119, 6143, 8191, 8209
Offset: 1

Views

Author

J. M. Bergot, Apr 21 2007

Keywords

Comments

Union of A000668, A081091 and A239712. - Robert Israel, Jun 13 2018

Examples

			2^2 + 2^5 + 1 = 4 + 32 + 1 = 37 is prime, hence 37 is a term.
2^4 + 2^5 - 1 = 16 + 32 - 1 = 47 is prime, hence 47 is a term.
2^3 + 2^6 + 1 = 8 + 64 + 1 = 73 is prime, hence 73 is a term.
		

Crossrefs

Cf. A000668 (Mersenne primes), A092506 (primes of form 2^n + 1), A070739 (primes of form 2^x+2^y+1), A081091, A239712.

Programs

  • Maple
    sort(convert(select(isprime, {2,seq(seq(seq(2^i+2^j+k,k=[-1,1]),j=1..i),i=1..15)}),list)); # Robert Israel, Jun 13 2018
  • Mathematica
    lst = {}; Do[p = 2^a + 2^b; If[PrimeQ[p - 1], AppendTo[lst, p - 1]]; If[PrimeQ[p + 1], AppendTo[lst, p + 1]], {a, 0, 14}, {b, 0, a}]; Union@ lst (* Robert G. Wilson v *)
  • PARI
    {m=13; v=[]; for(j=0, m, for(k=j, m, if(isprime(p=2^j+2^k-1), v=concat(v, p)); if(isprime(p=2^j+2^k+1), v=concat(v,p)))); w=Vec(listsort(List(v), 1)); w} /* Klaus Brockhaus, Apr 22 2007 */

Extensions

Edited, corrected and extended by Klaus Brockhaus and Robert G. Wilson v, Apr 22 2007

A164312 Numbers n such that k^n + (k-1)^n + ... + 3^n + 2^n + 1 is prime for some k.

Original entry on oeis.org

1, 2, 4, 8, 16, 1440
Offset: 1

Views

Author

Keywords

Comments

These terms have k-values {2, 2, 2, 2, 2, 5} respectively. When k = 2, the prime mentioned in the definition is given in A164307. - Derek Orr, Jun 06 2014

Examples

			1^1 + 2^1 = 3 is prime (k = 2).
1^2 + 2^2 = 5 is prime (k = 2).
1^4 + 2^4 = 17 is prime (k = 2).
1^8 + 2^8 = 257 is prime (k = 2).
1^16 + 2^16 = 65537 is prime (k = 2).
1^1440 + 2^1440 + 3^1440 + 4^1440 + 5^1440 = 3.287049497374559048967261852*10^1006 = 3287049497374559048967261852 ... 458593539025033893379 is prime (k = 5).
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[s=0;Do[If[PrimeQ[s+=n^x],AppendTo[lst,x];Print[Date[],x]],{n,4!}],{x,7!}];lst
  • PARI
    a(n)=for(k=1,10^3,if(ispseudoprime(sum(i=1,k,i^n)),return(k)))
    n=1;while(n<5000,if(a(n),print1(n,", "));n++) \\ Derek Orr, Jun 06 2014

Extensions

Definition improved by Derek Orr, Jun 06 2014

A193109 Least k such that 2^x + k produces primes for x=1..n and composite for x=n+1.

Original entry on oeis.org

0, 1, 9, 3, 225, 15, 65835, 1605, 19425, 2397347205, 153535525935
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 21 2011

Keywords

Comments

All terms except the first four are congruent to 15 mod 30.
a(10) was found in 2005 by T. D. Noe and a(11) was found in the same year by Don Reble.
Other known values: a(13) = 29503289812425.
a(12) > 10^13. - Tyler Busby, Feb 19 2023

Crossrefs

Another version of A110096.

Programs

  • Mathematica
    Table[k = 0; While[i = 1; While[i <= n && PrimeQ[2^i + k], i++]; i <= n || PrimeQ[2^i + k], k++]; k, {n, 9}] (* T. D. Noe, Jul 21 2011 *)
  • PARI
    is(k, n) = for(x=1, n, if(!isprime(k+2^x), return(0))); 1;
    a(n) = {my(s=2); forprime(p=3, n, if(znorder(Mod(2, p))==(p-1), s*=p)); forstep(k=s*(n>1)/2, oo, s, if(is(k, n) && !isprime(k+2^(n+1)), return(k))); } \\ Jinyuan Wang, Jul 30 2020
Previous Showing 21-30 of 47 results. Next