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!)
A340340 a(n) = n*A340339(n)+b, where b = 1 if n is even or 2 if n is odd. 2

%I #10 Jan 05 2021 10:52:15

%S 5,11,23,53,97,139,331,569,659,971,1201,1669,2251,3347,3617,4337,4813,

%T 5527,6709,8861,9431,10979,12583,13513,14827,16823,18443,19853,21433,

%U 22291,23593,25889,27689,29207,30697,32653,34819,36899,38651,40361,41863,44059,47431,53549,55667,59387,60961,63313

%N a(n) = n*A340339(n)+b, where b = 1 if n is even or 2 if n is odd.

%H Robert Israel, <a href="/A340340/b340340.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = n*A340339(n)+A000034(n).

%e a(4) = 4*A340339(4)+1 = 53.

%p f:= proc(n, p0)

%p local p, a, v;

%p if n::odd then a:= 2 else a:= 1 fi;

%p p:= p0;

%p do p:= nextprime(p)

%p until isprime(n*p+a);

%p return (p,n*p+a)

%p end proc:

%p p:= 2: R:= NULL:

%p for n from 1 to 100 do

%p p,v:= f(n,p);

%p R:= R, v;

%p od:

%p R;

%Y Cf. A000034, A340339.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Jan 04 2021

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 March 29 07:27 EDT 2024. Contains 371265 sequences. (Running on oeis4.)