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

A094490 Primes p such that 2^j+p^j are primes for j=0,2,4,64.

Original entry on oeis.org

37, 1423, 8537, 61333, 397963, 419927, 699217, 1151603, 1156823, 1210793, 1746923, 1809163, 1915477, 2012113, 2713127, 3617683, 4001567, 4192033, 4760117, 4768133, 5099623, 5432153, 5801737, 5909737, 5924833, 6118157
Offset: 1

Views

Author

Labos Elemer, Jun 01 2004

Keywords

Examples

			For j=0 1+1=2 is prime; other conditions are:
because of p^2+4==prime; 3rd and 4th conditions are as
follows: prime=p^4+16 and prime=2^64+p^64.
		

Crossrefs

Programs

  • Mathematica
    {ta=Table[0, {100}], u=1}; Do[s0=2;s2=4+Prime[j]^2;s4=16+Prime[j]^4;s64=2^64+Prime[j]^64 If[PrimeQ[s0]&&PrimeQ[s2]&&PrimeQ[s4]&&PrimeQ[s64], Print[{j, Prime[j]}];ta[[u]]=Prime[j];u=u+1], {j, 1, 1000000}]
    Select[Prime[Range[500000]],AllTrue[Table[2^j+#^j,{j,{0,2,4,64}}], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 29 2015 *)

A094492 Primes p such that 2^j+p^j are primes for j=0,1,4,16.

Original entry on oeis.org

179, 461, 521, 1877, 4259, 9767, 30389, 33071, 33329, 93701, 120077, 124247, 145547, 163481, 181871, 245627, 344171, 345731, 487427, 492671, 522281, 598187, 700199, 709739, 736061, 769259, 833717, 955709, 966869, 1009649, 1030739
Offset: 1

Views

Author

Labos Elemer, Jun 01 2004

Keywords

Comments

Primes of 2^j+p^j form are a generalization of Fermat-primes. 1^j is replaced by p^j. This is strongly supported by the observation that corresponding j-exponents are apparently powers of 2 like for the 5 known Fermat primes. See A094473-A094491.

Examples

			For j=0 1+1=2 is prime; other conditions are:
because of p^1+2=prime; 3rd and 4th conditions are as
follows: prime=p^4+16 and prime=65536+p^16.
		

Crossrefs

Programs

  • Mathematica
    {ta=Table[0, {100}], u=1}; Do[s0=2;s1=2+Prime[j]^1;s8=16+Prime[j]^4;s16=65536+Prime[j]^16 If[PrimeQ[s0]&&PrimeQ[s4]&&PrimeQ[s8]&&PrimeQ[s128], Print[{j, Prime[j]}];ta[[u]]=Prime[j];u=u+1], {j, 1, 1000000}]
    With[{j={0,1,4,16}},Select[Prime[Range[81000]],And@@PrimeQ[2^j+#^j]&]] (* Harvey P. Dale, Oct 17 2011 *)

A094498 Least prime factor of 2^(4*n) + 3^(4*n) = 16^n + 81^n.

Original entry on oeis.org

97, 17, 97, 3041, 41, 17, 97, 1153, 97, 17, 89, 193, 97, 17, 41, 769, 97, 17, 97, 3041, 97, 17, 97, 1153, 41, 17, 97, 3041, 97, 17, 97, 257, 89, 17, 41, 193, 97, 17, 97, 1153, 97, 17, 97, 353, 41, 17, 97, 769, 97, 17
Offset: 1

Views

Author

Labos Elemer, Jun 02 2004

Keywords

Crossrefs

Programs

  • Mathematica
    mif[x_]:=Part[Flatten[FactorInteger[x]], 1] Table[mif[16^w+81^w], {w, 1, 20}]
    Table[FactorInteger[16^n+81^n][[1,1]],{n,50}] (* Harvey P. Dale, Jun 02 2014 *)
  • PARI
    a(n) = vecmin(factor(16^n + 81^n)[,1]); \\ Michel Marcus, Oct 15 2019

Extensions

More terms from Harvey P. Dale, Jun 02 2014
Name corrected by Chai Wah Wu, Oct 14 2019

A123924 Numbers k such that 2^(k+1) + 3^k is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 11, 12, 15, 17, 22, 32, 33, 35, 36, 46, 47, 59, 63, 80, 101, 154, 159, 173, 221, 225, 236, 250, 281, 347, 789, 992, 1607, 1631, 1983, 2072, 3616, 3702, 5076, 5957, 6335, 8771, 10203, 10984, 12203, 12350, 13660, 14891
Offset: 1

Views

Author

Alexander Adamchuk, Nov 20 2006

Keywords

Comments

Also numbers k such that A123601(k) = A085279(k+1) = 2^(k+1) + 3^k. There are only 4 known primes of form the 2^k + 3^k, {2, 5, 13, 97} = A082101, corresponding to k = {0, 1, 2, 4}.

Crossrefs

Cf. A082101 (primes of form 2^k + 3^k), A085279, A123601 (smallest prime of the form p^n + q^n + r^n, where p,q,r are primes).

Programs

  • Mathematica
    Do[f=2^(n+1)+3^n;If[PrimeQ[f],Print[{n,f}]],{n,0,347}]
    Select[Range[0,6400],PrimeQ[2^(#+1)+3^#]&] (* Harvey P. Dale, Mar 04 2019 *)
  • PARI
    is(n)=ispseudoprime(2^(n+1)+3^n) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

More terms from Stefan Steinerberger, May 12 2007
a(44) from Jinyuan Wang, Aug 02 2021
a(45)-a(50) from Michael S. Branicky, Aug 05 2021

A161469 Primes of the form 3^k + 2^k - k^3 + k^2.

Original entry on oeis.org

2, 5, 17, 613, 129266611, 7625731683761, 150094704016430497, 2503155504994422192936289397051173, 4638397686588101984398752568803509060305779468709
Offset: 1

Views

Author

Keywords

Comments

The associated values of k are 0, 1,3,6,17,27,36,70,102,237,377,463,576,639,683,... - R. J. Mathar, Jun 12 2009 [Amended by Harvey P. Dale, Jan 23 2023]
The next term (a(10)) has 114 digits. - Harvey P. Dale, Jan 23 2023

Crossrefs

Programs

  • Magma
    [ a: n in [1..450] | IsPrime(a) where a is 3^n+2^n-n^3+n^2]; // Vincenzo Librandi, Nov 30 2010
  • Mathematica
    lst={};Do[If[PrimeQ[p=(3^n+2^n)-(n^3-n^2)],AppendTo[lst,p]],{n,0,6!}];lst
    Select[Table[3^k+2^k-k^3+k^2,{k,0,200}],PrimeQ] (* Harvey P. Dale, Jan 23 2023 *)

Extensions

Definition simplified by R. J. Mathar, Jun 12 2009
a(1) = 2 prepended by Harvey P. Dale, Jan 23 2023

A165443 a(n) = ( 16^(2*n+1) + 81^(2*n+1) )/97.

Original entry on oeis.org

1, 5521, 35957041, 235845988561, 1547368082644081, 10152277523461827601, 66609091687940958003121, 437022250271846649679394641, 2867302983958645970747063186161, 18812374877733491600234823630721681
Offset: 0

Views

Author

Jaume Oliver Lafont, Sep 19 2009

Keywords

Comments

The general form of the g.f. for (A^(2*n+1)+B^(2*n+1))/(A+B) is (1-A*B*x)/((1-A^2*x)(1-B^2*x)).

Examples

			a(0) = (16^1 + 81^1)/97 = 97/97 = 1.
a(1) = (16^3 + 81^3)/97 = 535537/97 = 5521.
		

Crossrefs

Programs

  • GAP
    List([0..10],n->(16^(2*n+1)+81^(2*n+1))/97); # Muniru A Asiru, Oct 21 2018
    
  • Magma
    [(2^(8*n+4) + 3^(8*n+4))/97: n in [0..20]]; // G. C. Greubel, Oct 20 2018
    
  • Maple
    seq(coeff(series((1-16*81*x)/((1-16^2*x)*(1-81^2*x)),x,n+1), x, n), n = 0 .. 10); # Muniru A Asiru, Oct 21 2018
  • Mathematica
    f[n_]:=Module[{c=2n+1},(16^c+81^c)/97]; Array[f,20,0] (* Harvey P. Dale, Oct 02 2012 *)
  • PARI
    a(n)=(16^(2*n+1)+81^(2*n+1))/97
    
  • Python
    for n in range(0, 10): print(int((16**(2*n+1)+81**(2*n+1))/97), end=', ') # Stefano Spezia, Oct 21 2018

Formula

G.f.: (1 - 16*81*x)/((1 - 16^2*x)*(1 - 81^2*x)).
a(n) = (16^2+81^2)*a(n-1) - 16^2*81^2*a(n-2).

Extensions

Definition replaced with formula by R. J. Mathar, Sep 21 2009

A174326 Exactly one of 3^n +- 2^n is prime.

Original entry on oeis.org

0, 1, 3, 4, 5, 17, 29, 31, 53, 59, 101, 277, 647, 1061, 2381, 2833, 3613, 3853, 3929, 5297, 7417, 90217, 122219, 173191, 256199, 336353, 485977, 591827, 1059503
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 15 2010

Keywords

Comments

Either (but not both) of 3^n - 2^n and 3^n + 2^n is prime. - Harvey P. Dale, Sep 16 2016
If 3^n + 2^n is prime then n must be a power of 2, and 3^n + 2^n is a generalized Fermat prime. It is conjectured that 3^n + 2^n is prime only for n=1,2,4: see A082101. - Robert Israel, Mar 15 2017, edited May 18 2017.

Examples

			a(1)=0 because 3^0 - 2^0 = 0 = nonprime and 3^0 + 2^0 = 2 = prime;
a(2)=1 because 3^1 - 2^1 = 1 = nonprime and 3^1 + 2^1 = 5 = prime;
a(3)=3 because 3^3 - 2^3 = 19 = prime and 3^3 + 2^3 = 35 = nonprime.
		

Crossrefs

Programs

  • Mathematica
    epQ[n_]:=Module[{a=3^n,b=2^n},Sort[PrimeQ[{a+b,a-b}]]=={False,True}]; Select[Range[0,4000],epQ] (* Harvey P. Dale, Sep 16 2016 *)
  • PARI
    is(n)=isprime(3^n+2^n)+isprime(3^n-2^n)==1 \\ Charles R Greathouse IV, Mar 19 2017

Extensions

9 and 11 removed by R. J. Mathar, Mar 29 2010
More terms from Harvey P. Dale, Sep 16 2016
a(20) from Robert G. Wilson v, Mar 15 2017
a(21) to a(29) (using data from A057468) from Robert Israel, May 18 2017

A219283 Primes of the form 13^k - 12^k.

Original entry on oeis.org

6431804812640900941, 31211427601852046808999765129652549, 4519079836942618423019040742735616921552429101, 22137406298265966315641393147750228275603823278911109
Offset: 1

Views

Author

Vincenzo Librandi, Nov 23 2012

Keywords

Crossrefs

Cf. A062579 (associated k).

Programs

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

A229222 Smallest prime p such that p contains a digit larger than 1 and the sum of the n-th powers of the decimal digits of p is a prime number.

Original entry on oeis.org

2, 23, 113, 23, 191, 223, 191, 41, 223, 113, 157, 191, 137, 113, 113, 43, 137, 191, 179, 337, 577, 223, 227, 113, 263, 113, 199, 229, 263, 199, 467, 89, 223, 179, 223, 113, 443, 683, 1279, 337, 661, 463, 827, 2281, 577, 223, 223, 661, 137, 229, 11399, 461, 577
Offset: 1

Views

Author

Michel Lagneau, Sep 16 2013

Keywords

Comments

We impose the condition that p is not in A020449 in order to avoid trivial sequences with infinite repetitions with the numbers 11 if p>1, or 101 if p>11, or 101111 if p > 101, ... for example if p > 1 the sequence is {2, 11, 11, 11, ...}, if p > 11 the sequence is {23, 23, 101, 23, 101, 101, 41, 101, 101, 101, 101, 101, ...}.
a(n) is an unification of a family of sequences mentioned hereafter:
A082101: primes of the form 2^n+3^n => 23 is in the sequence;
A057735: primes of the form 3^n+2 => 113 is in the sequence;
A153133: primes of the form 2^n+3^(n-1) => 223 is in the sequence;
A228034: primes of the form 9^n+2 => 191 is in the sequence;
A057733: primes of the form 2^n+3 => 2111 is in the sequence;
A228026: primes of the form 4^n+3 => 4111 is in the sequence;
A228034: primes of the form 9^n+2 => 191 is in the sequence;
A182330: primes of the form 5^n+2 => 151 is in the sequence;
A111974: primes of the form 2*3^n+1 => 313 is in the sequence;
A102903: primes of the form 3^n+4 => 11113 is in the sequence.
In this sequence, we observe repetitions of numbers such that 23, 113, 223, 191, 199, 223,... and this problem is very difficult, because it is probable that there exists both finite and infinite repetitions according to the numbers: for example, if we consider the number 23 of this sequence, it is probable that the number of element "23" is finite (see the comment in A082101 for the primes of form 2^k + 3^k). But, if we consider the number 113 of this sequence, is the number of the elements "113" infinite ? (see A057735 with the primes of the form 2+3^n). We observe that a(n) = 113 for n = 3, 14, 15, 24, 26,..., 123, 126, 139,..., 386, 391, 494, ....

Examples

			a(3) = 113 because 1^3+1^3+3^3 = 29 is prime.
		

Crossrefs

Cf. A020449.

Programs

  • Maple
    with(numtheory) :lst:={11, 101, 101111, 10011101, 10101101, 10110011, 10111001, 11000111, 11100101, 11110111, 11111101 }:for n from 1 to 300 do :ii:=0:for k from 1 to 10^8 while(ii=0) do:x:=convert(k,base,10):n1:=nops(x):it:=0:jj:=0:s:= sum('x[i]^n', 'i'=1..n1):lst1:={k} intersect lst:if type(k,prime)=true and type(s,prime)=true and (lst1<>{k}) then ii:=1: printf(`%d, `,k):else fi:od:od:
  • Mathematica
    Table[p = 2; While[d = IntegerDigits[p]; Union[d][[-1]] < 2 || ! PrimeQ[Total[d^n]],  p = NextPrime[p]]; p, {n, 60}]
  • PARI
    a(n)=forprime(p=2,,my(d=digits(p)); if(vecmax(d)>1 && isprime(sum(i=1,#d,d[i]^n)), return(p))) \\ Charles R Greathouse IV, Sep 19 2013

A240766 Least number k > 0 such that n^k + (n-1)^k + ... + 3^k + 2^k is prime, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 2, 0, 0, 2, 12, 0, 0, 56, 10, 0, 0, 0, 16, 0, 0, 0
Offset: 2

Views

Author

Derek Orr, Apr 12 2014

Keywords

Comments

a(n) is definitely 0 for n == 1 mod 4 or 2 mod 4 (except a(2) = 1). This is the case for n=5,6, 9,10, 13,14, 17,18, ...
Further, if n-1 is not squarefree, then a(n) = 0. Thus, if n-1 is in A013929, then a(n) = 0. This is the case for n = 5, 9, 10, 13, 17, 19, 21, ...
From the first two comments, we can conclude that there are an infinite number of 0 entries.
Let S = n^k + (n-1)^k + ... + 3^k + 2^k. Then, S is divisible by gpf(n-1) when k is not a multiple of gpf(n-1)-1, where gpf(x) denotes the greatest prime factor of x. This means that if a(n) is not 0, then a(n) must be a multiple of gpf(n-1)-1 for any n. Note that this holds with the previous findings.
For n <= 200, if n = {15, 23, 24, 32, 44, 59, 60, 68, 71, 75, 87, 88, 95, 96, 104, 107, 115, 120, 123, 131, 132, 140, 144, 151, 156, 159, 164, 167, 168, 184, 187, 188, 191, 195}, there is a pattern with the factorization of S when k is a multiple of gpf(n-1)-1. Thus, a(n) = 0 is definite for these n-values.
For other n-values <= 200, there is not a concrete pattern when k is a multiple of gpf(n-1)-1. If n = 20 or n = 72, a(n) > 10000, if n = {27, 35, 39, 48, 52, 63, 79, 80, 84, 92}, a(n) > 7500, and if n = {103, 108, 111, 112, 116, 119, 124, 128, 135, 139, 143, 147, 152, 155, 160, 175, 179, 180, 183, 192, 196, 200}, a(n) > 5000. Here, a(n) could still be nonzero.
For n < 200, it is known that a(31) = 2528, a(36) = 12, a(40) = 360, a(43) = 6, a(47) = 66, a(56) = 1580, a(67) = 390, a(83) = 80, and a(171) = 1984.

Examples

			4^1+3^1+2^1 = 9 is not prime. 4^2+3^2+2^2 = 29 is prime. Thus, a(4) = 2.
		

Crossrefs

Programs

  • PARI
    a(n)=for(k=1,4000,if(ispseudoprime(sum(i=2,n,i^k)),return(k)))
    n=1; while(n<200,print(a(n));n+=1)
Previous Showing 21-30 of 39 results. Next