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-3 of 3 results.

A081506 Primes of the form 2^k + 3^k + 4^k.

Original entry on oeis.org

3, 29, 353, 4889, 72353, 105312291668560568089831550410013687058921146068446092937783402353
Offset: 1

Views

Author

Labos Elemer, Apr 15 2003

Keywords

Comments

The next term (a(7)) has 202 digits. - Harvey P. Dale, Aug 20 2015

Examples

			k = 2: 2^2 + 3^2 + 4^2 = 4 + 9 + 16 = 29, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[s=2^w+3^w+4^w; If[IntegerQ[w/100], Print[{w}]]; If[PrimeQ[s], Print[{w, s}]], {w, 0, 1000}]
    Select[Table[2^n+3^n+4^n,{n,0,200}],PrimeQ] (* Harvey P. Dale, Aug 20 2015 *)
  • PARI
    lista(kmax) = {my(p); for(k = 0, kmax, p = 2^k + 3^k + 4^k; if(isprime(p), print1(p, ", ")));} \\ Amiram Eldar, Aug 17 2024

Formula

a(n) = A074526(A081507(n)). - Amiram Eldar, Aug 17 2024

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)

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

Original entry on oeis.org

2, 3, 4, 7, 8, 11, 12, 16
Offset: 1

Views

Author

Derek Orr, Apr 12 2014

Keywords

Comments

a(9) > 19. See A240766 for more information.
a(n) is also the n-values such that A240766(n) is nonzero.
It is known that a(n) must be == 3 mod 4 or 0 mod 4 (except a(1) = 2) due to the parity of the sum. If an n-value is congruent to 1 mod 4 or 2 mod 4, the sum will always be even and thus, not prime.
It is known that 31, 36, 40, 43, 47, 56, 67, 83, and 171 are members of this sequence.
If n-1 is not squarefree, then n is not a member of this sequence.

Examples

			2^k is prime for at least one k (and only one k in this instance; k = 1). Thus, 2 is a member of this sequence.
3^k+2^k is prime for at least one k (see A082101). Thus, 3 is a member of this sequence.
		

Crossrefs

Programs

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