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!)
A106215 The first n primes, connected by, from left to right, alternating + and * signs. 1

%I #11 Jan 31 2024 15:07:01

%S 2,5,17,24,94,107,315,334,752,781,1651,1688,3168,3211,5189,5242,8316,

%T 8377,12403,12474,17586,17665,24143,24232,32776,32877,43179,43286,

%U 54842,54955,69193,69324,87140,87279,107851,108002,131558,131721,158779

%N The first n primes, connected by, from left to right, alternating + and * signs.

%C a(n) is prime for n = 1, 2, 3, 6, 15, 18, 31, 43, 82, ... a(n) is semiprime for n = 5, 8, 10, 11, 16, 19, 22, 23, 35, 36, 39, 41, 47, 50, 55, 56, 58, 63, 65, 66, 80, 83, ...

%e a(1) = 2, itself a prime;

%e a(2) = 2+3 = 5, itself a prime;

%e a(3) = 2+3*5 = 17, itself a prime;

%e a(4) = 2+3*5+7 = 24;

%e a(5) = 2+3*5+7*11 = 94;

%e a(15) = 2+3*5+7*11+13*17+19*23+29*31+37*41+43*47 = 5189, prime;

%e a(31) =

%e 2+3*5+7*11+13*17+19*23+29*31+37*41+43*47+53*59+61*67+71*73+79*83+89*97+101*103+107*109+113*127 = 69193, which is prime.

%p A106215 := proc(n) if type(n,'odd') then a := 2 ; for i from 2 to n by 2 do a := a+ithprime(i)*ithprime(i+1) ; end do: else a := 2 +ithprime(n); for i from 2 to n-1 by 2 do a := a+ithprime(i)*ithprime(i+1) ; end do: end if; a; end proc: # _R. J. Mathar_, Dec 22 2010

%t a[1]=2;a[n_]:= If[EvenQ[n],a[n-1]+Prime[n],a[n-2]+Prime[n-1]*Prime[n]];Table[a[n],{n,39}] (* _James C. McMahon_, Jan 31 2024 *)

%K easy,nonn

%O 1,1

%A _Jonathan Vos Post_, Jul 12 2005

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 April 26 10:59 EDT 2024. Contains 371997 sequences. (Running on oeis4.)