

A175851


a(n) = 1 for noncomposite n, a(n) = n  previousprime(n) + 1 for composite n.


13



1, 1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

Sequence is cardinal and not fractal. Cardinal sequence is sequence with infinitely many times occurring all natural numbers. Fractal sequence is sequence such that when the first instance of each number in the sequence is erased, the original sequence remains.
Ordinal transform of the nextprime function, A151800(1..) = 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, ..., also ordinal transform of A304106.  Antti Karttunen, Jun 09 2018


LINKS

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


FORMULA

a(1) = 1, a(n) = n  A007917(n) + 1 for n >= 2. a(1) = 1, a(2) = 1, a(n) = n  A151799(n+1) + 1 for n >= 3.


PROG

(PARI) A175851(n) = if(1==n, n, 1 + n  precprime(n)); \\ Antti Karttunen, Mar 04 2018


CROSSREFS

Cf. A000720, A007917, A008578, A151799, A151800, A305300.
Cf. A065358 for another way of visualizing prime gaps.
Cf. A304106 (ordinal transform of this sequence).
Sequence in context: A160975 A305300 A330241 * A049711 A137293 A177803
Adjacent sequences: A175848 A175849 A175850 * A175852 A175853 A175854


KEYWORD

nonn,look


AUTHOR

Jaroslav Krizek, Sep 29 2010


STATUS

approved



