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.

A057061 a(n) = number of the column of (R(i,j)) that contains prime(n), where R(i,j) is the rectangle with antidiagonals 1; 2,3; 4,5,6; ...

Original entry on oeis.org

2, 1, 2, 4, 5, 3, 5, 3, 6, 8, 6, 9, 5, 3, 9, 3, 8, 6, 12, 8, 6, 13, 9, 3, 9, 5, 3, 14, 12, 8, 10, 6, 17, 15, 5, 3, 15, 9, 5, 18, 12, 10, 20, 18, 14, 12, 21, 9, 5, 3, 21, 15, 13, 3, 20, 14, 8, 6, 24, 20, 18, 8, 19, 15, 13, 9, 21, 15, 5, 3, 26, 20, 12, 6
Offset: 1

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

The rectangle R(i,j) has this corner:
1, 2, 4, 7, 11, 16, 22, 29, ...
3, 5, 8, 12, 17, 23, 30, 38, ...
6, 9, 13, 18, 24, 31, 39, 48, ...
10, 14, 19, 25, 32, 40, 49, 59, ...
15, 20, 26, 33, 41, 50, 60, 71, ...
21, 27, 34, 42, 51, 61, 72, 84, ...
28, 35, 43, 52, 62, 73, 85, 98, ...

Examples

			The 8th prime, 19, is in column 3, so a(8) = 3.
		

Crossrefs

See A057060 for primes in rows.

Programs

  • PARI
    f(n) = 1 + binomial(1 + floor(1/2 + sqrt(2*n)), 2) - n; \\ A004736
    a(n) = f(prime(n)); \\ Michel Marcus, Feb 24 2023

Formula

a(n) = A004736(prime(n)). - Michel Marcus, Feb 24 2023

Extensions

Edited by Clark Kimberling, Feb 12 2013