A230849 A075526 and A000012 interleaved.
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, 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, 10, 1, 2, 1, 6, 1, 6, 1, 4, 1, 6, 1, 6, 1, 2, 1, 10, 1, 2, 1
Offset: 1
Keywords
Examples
Illustration of initial terms, n = 1..22: . 1 _ _| 1 _ _ _ _ _ _| 1 _ _ _ _| 1 _ _| 1 _ _ _ _| 1 _ _| 1 _ _ _ _| 1 _ _| 1 _ _| 1 _| 1 _| . . 1 1 2 2 4 2 4 2 4 6 2 . Drawing vertical line segments below the staircase (as shown below) we have that the number of cells in the vertical bars gives A000720. Drawing horizontal line segments above the staircase we have that the number of cells in the k-th horizontal bar is A006093(k). . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 30 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| 28 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | 22 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | 18 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | 16 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | 12 |_ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | 10 |_ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | 6 |_ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | 4 |_ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | | 2 |_ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_| . . 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 .
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Crossrefs
Programs
-
Mathematica
Riffle[Join[{1},Differences[Prime[Range[100]]]],1] (* Paolo Xausa, Oct 31 2023 *)
-
PARI
A230849(n) = if((n%2)&&(n>1),prime((n+1)/2)-prime(((n+1)/2)-1),1); \\ Antti Karttunen, Dec 23 2018
Comments