OFFSET
1,2
COMMENTS
Any integer greater than 1 appears infinitely many times.
In particular, any n appears at the position (n^2 + n)/2. For prime n > 2, this is its first appearance; for composite n, it is not the first.
2 appears at the positions 2, 3, 4, 7, 22, 232, 26797, ... (A007501(n) + 1).
When the sequence is considered as an array, any prime n appears only in the first row (infinitely many times) and in the first column (once).
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..26796
FORMULA
a((n^2+n)/2)=n.
EXAMPLE
The sequence begins: 1, 2, 2, 2, 4, 3, 2, 4, 6, 4, ...
It represents a rectangular array read by downward antidiagonals. The first row of the array is this very sequence itself. The second row is this sequence multiplied by 2, and so on:
1 2 2 2 4 3 ...
2 4 4 4 8 ...
3 6 6 6 ...
4 8 8 ...
5 10 ...
6 ...
...
MATHEMATICA
Nest[Flatten@Table[#[[n - i]]*i, {n, Length[#] + 1}, {i, n - 1}] &, {1, 2}, 4]
CROSSREFS
AUTHOR
Ivan Neretin, Mar 14 2017
STATUS
approved