

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).


4



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000


FORMULA

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


EXAMPLE

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.


PROG

(Scheme) (definec (A278168 n) (if (= 1 n) (A277488 n) (+ (A277488 n) (A278168 ( n 1)))))


CROSSREFS

Partial sums of A277488.
Cf. A002828, A255131, A278166, A278167.
Sequence in context: A322004 A240214 A181132 * A130271 A139369 A151555
Adjacent sequences: A278165 A278166 A278167 * A278169 A278170 A278171


KEYWORD

nonn


AUTHOR

Antti Karttunen, Nov 13 2016


STATUS

approved



