login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A057458 Number of k, 1 <= k <= n, where {k (n+1-k) + 1} is prime. 1

%I #12 Jul 22 2019 19:22:09

%S 1,2,1,4,0,6,3,2,2,8,1,12,2,2,4,16,2,10,5,2,8,14,2,14,2,8,9,16,0,20,

%T 11,4,4,14,2,18,16,8,7,28,2,32,6,6,10,24,5,14,14,8,21,42,0,22,8,14,12,

%U 22,4,24,18,14,20,14,2,44,14,14,10,34,5,46,20,4,18,38,4,38,15,10,16,46,2

%N Number of k, 1 <= k <= n, where {k (n+1-k) + 1} is prime.

%e For n = 7, 2*6 + 1, 4*4 + 1 and 6*2 + 1 are prime, so a(7) = 3.

%p A057458 := proc(n)

%p a := 0 ;

%p for k from 1 to n do

%p if isprime(1+k*(n+1-k)) then

%p a := a+1 ;

%p end if;

%p end do:

%p a;

%p end proc:

%p seq(A057458(n),n=1..80) ; # _R. J. Mathar_, Jan 28 2014

%t Table[Count[Table[k(n+1-k)+1,{k,n}],_?PrimeQ],{n,90}] (* _Harvey P. Dale_, Jul 22 2019 *)

%K nonn

%O 1,2

%A _Leroy Quet_, Sep 26 2000

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 25 12:21 EDT 2024. Contains 374588 sequences. (Running on oeis4.)