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.

A278168 a(n) = number of integers one less 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

0, 1, 1, 3, 4, 5, 5, 8, 10, 13, 15, 16, 17, 19, 20, 23, 25, 28, 29, 31, 35, 39, 40, 42, 45, 47, 49, 52, 56, 59, 62, 66, 69, 73, 76, 78, 82, 87, 92, 96, 100, 103, 107, 112, 116, 120, 123, 127, 133, 137, 143, 151, 155, 159, 162, 167, 174, 177, 184, 186, 192, 198, 202, 209, 216, 220, 225, 232, 236, 244, 250, 254, 258, 261, 267, 278, 282, 287, 292, 301
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 [25, 22, 19, 17, 16, 12, 9, 7, 4], of which only 19, 17, and 7 are primes, thus a(4) = 3.
		

Crossrefs

Partial sums of A277488.

Programs

Formula

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