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!)
A350169 Write 1st prime and decrement 0 times, then write 2nd prime and decrement once, write 3rd prime and decrement twice, write 4th prime and decrement 3 times, etc ... 0

%I #9 Dec 18 2021 14:53:33

%S 2,3,2,5,4,3,7,6,5,4,11,10,9,8,7,13,12,11,10,9,8,17,16,15,14,13,12,11,

%T 19,18,17,16,15,14,13,12,23,22,21,20,19,18,17,16,15,29,28,27,26,25,24,

%U 23,22,21,20,31,30,29,28,27,26,25,24,23,22,21,37,36,35,34,33,32,31,30,29,28,27,26

%N Write 1st prime and decrement 0 times, then write 2nd prime and decrement once, write 3rd prime and decrement twice, write 4th prime and decrement 3 times, etc ...

%D J.-P. Delahaye, Des suites fractales d’entiers, Pour la Science, No. 531 January 2022. Sequence b) p. 82.

%e As a triangle, this begins:

%e [2]

%e [3, 2]

%e [5, 4, 3]

%e [7, 6, 5, 4]

%e [11, 10, 9, 8, 7]

%e [13, 12, 11, 10, 9, 8]

%e [17, 16, 15, 14, 13, 12, 11]

%e [19, 18, 17, 16, 15, 14, 13, 12]

%e [23, 22, 21, 20, 19, 18, 17, 16, 15]

%e ...

%p a:=[];

%p for n from 1 to 16 do

%p t1:=[seq(ithprime(n)-i,i=0..n-1)];

%p lprint(t1);

%p a:=[op(a),op(t1)];

%p od:

%p a; # _N. J. A. Sloane_, Dec 18 2021

%o (Python)

%o from sympy import prime

%o from itertools import count, islice

%o def agen():

%o for i in count(1):

%o pi = prime(i)

%o yield from range(pi, pi-i, -1)

%o print(list(islice(agen(), 69))) # _Michael S. Branicky_, Dec 18 2021

%Y Cf. A000040.

%K nonn,tabf

%O 1,1

%A _Michel Marcus_, Dec 18 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 September 14 21:48 EDT 2024. Contains 375929 sequences. (Running on oeis4.)