cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A230849 A075526 and A000012 interleaved.

This page as a plain text file.
%I A230849 #18 Oct 31 2023 07:00:27
%S A230849 1,1,1,1,2,1,2,1,4,1,2,1,4,1,2,1,4,1,6,1,2,1,6,1,4,1,2,1,4,1,6,1,6,1,
%T A230849 2,1,6,1,4,1,2,1,6,1,4,1,6,1,8,1,4,1,2,1,4,1,2,1,4,1,14,1,4,1,6,1,2,1,
%U A230849 10,1,2,1,6,1,6,1,4,1,6,1,6,1,2,1,10,1,2,1
%N A230849 A075526 and A000012 interleaved.
%C A230849 a(n) is also the length of the n-th edge of a staircase which represents the function pi(x) on the first quadrant of the square grid, see A000720.
%C A230849 a(2n-1) is the length of the n-th horizontal edge in the staircase.
%C A230849 a(2n) is the length of the n-th vertical edge in the staircase.
%C A230849 For another version see A230850.
%H A230849 Antti Karttunen, <a href="/A230849/b230849.txt">Table of n, a(n) for n = 1..20000</a>
%e A230849 Illustration of initial terms, n = 1..22:
%e A230849 .
%e A230849 1                                                            _ _|
%e A230849 1                                                _ _ _ _ _ _|
%e A230849 1                                        _ _ _ _|
%e A230849 1                                    _ _|
%e A230849 1                            _ _ _ _|
%e A230849 1                        _ _|
%e A230849 1                _ _ _ _|
%e A230849 1            _ _|
%e A230849 1        _ _|
%e A230849 1      _|
%e A230849 1    _|
%e A230849 .
%e A230849 .    1 1   2   2       4   2       4   2       4           6   2
%e A230849 .
%e A230849 Drawing vertical line segments below the staircase (as shown below) we have that the number of cells in the vertical bars gives A000720.
%e A230849 Drawing horizontal line segments above the staircase we have that the number of cells in the k-th horizontal bar is A006093(k).
%e A230849 .    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
%e A230849 30  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
%e A230849 28  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
%e A230849 22  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
%e A230849 18  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
%e A230849 16  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
%e A230849 12  |_ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
%e A230849 10  |_ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
%e A230849 6   |_ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
%e A230849 4   |_ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
%e A230849 2   |_ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
%e A230849 1   |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
%e A230849 .
%e A230849 .    0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10
%e A230849 .
%t A230849 Riffle[Join[{1},Differences[Prime[Range[100]]]],1] (* _Paolo Xausa_, Oct 31 2023 *)
%o A230849 (PARI) A230849(n) = if((n%2)&&(n>1),prime((n+1)/2)-prime(((n+1)/2)-1),1); \\ _Antti Karttunen_, Dec 23 2018
%Y A230849 Cf. A000012, A000040, A000720, A001223, A006093, A007504, A046992, A075526, A141042, A152535, A230850.
%K A230849 nonn
%O A230849 1,5
%A A230849 _Omar E. Pol_, Nov 01 2013