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.

A278166 a(n) = number of integers one more than a prime encountered before reaching 0 when starting from k = ((n+1)^2)-1 and iterating map k -> k - A002828(k).

Original entry on oeis.org

1, 3, 3, 5, 7, 9, 9, 11, 12, 14, 15, 18, 19, 22, 23, 26, 29, 31, 34, 37, 42, 46, 47, 51, 54, 58, 60, 64, 68, 70, 74, 78, 82, 85, 88, 92, 95, 99, 104, 109, 114, 118, 122, 128, 134, 137, 140, 149, 153, 158, 164, 173, 177, 183, 187, 191, 199, 205, 210, 217, 222, 231, 236, 241, 248, 256, 262, 273, 278, 287, 291, 298, 307, 316, 322, 332
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2016

Keywords

Examples

			For n=4, starting from k = ((4+1)^2)-1, and iterating k -> A255131(k), yields 24 -> 21 -> 18 -> 16 -> 15 -> 11 -> 8 -> 6 -> 3 before 0 is reached. Subtracting one from each gives [23, 20, 17, 15, 14, 10, 7, 5, 2], of which only 23, 17, 7, 5 and 2 are primes, thus a(4) = 5.
		

Crossrefs

Partial sums of A277486.

Programs

Formula

a(1) = A277486(1); for n > 1, a(n) = A277486(n) + a(n-1).