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.

A245514 Smallest m such that at least one of the two odd numbers which bracket n^m is not a prime.

This page as a plain text file.
%I A245514 #12 Feb 03 2018 12:27:20
%S A245514 1,1,2,2,2,1,1,3,1,1,2,1,1,3,1,1,2,1,1,3,1,1,1,1,1,1,1,1,2,1,1,1,1,1,
%T A245514 1,1,1,2,1,1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,2,
%U A245514 1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
%N A245514 Smallest m such that at least one of the two odd numbers which bracket n^m is not a prime.
%C A245514 The locution "the two odd numbers which bracket n^m" indicates the pair (n^m-1,n^m+1) for even n and (n^m-2,n^m+2) for odd n.
%C A245514 The initial records in this sequence are a(2)=1, a(4)=2, a(9)=3, a(102795)=4. No higher value was found up to 5500000. It is not clear whether a(n) is bounded.
%H A245514 Stanislav Sykora, <a href="/A245514/b245514.txt">Table of n, a(n) for n = 2..10000</a>
%e A245514 a(2)=1 because one of the two odd numbers (1,3) which bracket 2^1 is not a prime. a(5)=2 because 5^1 is bracketed by the odd numbers (3,7) which are both prime, while 5^2 is bracketed by the odd numbers (23,27), one of which is not a prime.
%e A245514 The number c=102795 is the smallest one whose powers c^1, c^2, c^3 are all odd-bracketed by primes, while c^4 is not.
%o A245514 (PARI) avector(nmax)={my(n, k, d=2, v=vector(nmax)); for(n=2, #v+1, d=3-d; k=1; while(1, if((!isprime(n^k-d))||(!isprime(n^k+d)), v[n-1]=k; break, k++)); ); return(v); }
%o A245514 a=avector(10000)  \\ For nmax=6000000 runs out of 1GB memory
%Y A245514 Cf. A245509, A245510, A245511, A245512, A245513.
%K A245514 nonn
%O A245514 2,3
%A A245514 _Stanislav Sykora_, Jul 24 2014