login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Take sequence of prime numbers (A000040) and reverse successive subsequences of lengths 1,2,3,4,...
1

%I #11 Jul 05 2022 11:17:27

%S 2,5,3,13,11,7,29,23,19,17,47,43,41,37,31,73,71,67,61,59,53,107,103,

%T 101,97,89,83,79,151,149,139,137,131,127,113,109,197,193,191,181,179,

%U 173,167,163,157,257,251,241,239,233,229,227,223,211,199,317,313,311,307

%N Take sequence of prime numbers (A000040) and reverse successive subsequences of lengths 1,2,3,4,...

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

%F a(n) = A000040(A038722(n)). - _M. F. Hasler_, Aug 24 2014

%p S:= ListTools:-PartialSums([$1..20]):

%p P:= [seq(ithprime(i),i=1..S[-1])]:

%p map(op, [[P[1]],seq(ListTools:-Reverse(P[S[i]+1..S[i+1]]),i=1..nops(S)-1)]); # _Robert Israel_, Sep 04 2017

%Y Cf. A000040, A038722.

%K easy,nonn

%O 1,1

%A _Felix Tubiana_, Feb 23 2004

%E Offset changed from 0 to 1 by _M. F. Hasler_, Aug 24 2014