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.

A231735 Least positive k such that n*k^k - 1 is a prime, or 0 if no such k exists.

Original entry on oeis.org

2, 2, 1, 1, 2, 1, 1128, 1, 0, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 14, 1, 0, 2, 2, 6, 206, 1, 1590, 1, 2, 11, 2, 3
Offset: 1

Views

Author

Alex Ratushnyak, Nov 12 2013

Keywords

Comments

From Gordon Atkinson, Aug 20 2019: (Start)
For all odd numbers n > 3, a(n) is even.
For all odd numbers n > 1, a(n^2) = 0. (End)
a(37) > 10^4. - Jinyuan Wang, Mar 05 2020
From Kevin P. Thompson, Feb 12 2023: (Start)
Other known terms: a(38) = 1, a(39) = 6, a(40) = 6, a(41) = 2, a(42) = 1, a(44) = 8, a(45) = 22, a(47) = 48, a(48) = 7, a(49) = 0, a(50) = 14.
Other unknown terms: a(43) > 5000, a(46) > 1000, a(51) > 1000. (End)
a(37) > 10^5, a(43) > 10^5, a(46) = 5430, a(51) = 4010. - Jason Yuen, Jan 19 2025
a(37) > 150000, a(43) > 323000. - Phillip Poplin, May 28 2025

Examples

			The least k > 0 such that 5*k^k - 1 is a prime is k = 2, so a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[If[And[n > 1, OddQ@ Sqrt@ n], 0, If[And[n > 3, OddQ@ n], Block[{k = 2}, While[! PrimeQ[n*k^k - 1], k += 2]; k], Block[{k = 1}, While[! PrimeQ[n*k^k - 1], k++]; k]]], {n, 36}] (* Michael De Vlieger, Sep 29 2019 *)
  • PARI
    a(n) = if(sqrt(n)%2==1 && n>1, 0, for(k=1, oo, if(ispseudoprime(n*k^k-1), return(k)))); \\ Jinyuan Wang, Mar 05 2020

Formula

a(A008864(k)) = 1. - Gordon Atkinson, Sep 04 2019

Extensions

a(9) and a(25) from Gordon Atkinson, Aug 20 2019
a(26)-a(36) from Alois P. Heinz, Aug 20 2019