login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A278515 Number of steps required to iterate map k -> A255131(k) when starting from k = (A000196(n)+1)^2 before n is reached, or 0 if n is not reached. 2
1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 2, 0, 0, 0, 1, 4, 0, 3, 0, 0, 2, 0, 0, 1, 0, 0, 4, 0, 0, 3, 0, 2, 0, 0, 1, 0, 0, 5, 0, 4, 0, 0, 3, 0, 2, 0, 0, 1, 0, 0, 5, 0, 4, 0, 0, 3, 0, 0, 2, 0, 0, 0, 1, 7, 0, 0, 6, 0, 0, 5, 0, 4, 0, 0, 3, 0, 0, 2, 0, 1, 0, 0, 7, 0, 6, 0, 0, 5, 0, 4, 0, 0, 3, 0, 0, 2, 0, 0, 1, 0, 0, 7, 0, 0, 6, 0, 0, 5, 0, 0, 0, 4, 0, 0, 3, 0, 2, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,7

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..10200

EXAMPLE

For n=15, we start iterating from the next larger square, (⌊√15⌋+1)^2 = 16, and in just a single step (16 - A002828(16) = 15) we land to n, so a(15) = 1.

For n=16, we start iterating from the next larger square, which is 25, and thus we have 25 -> A255131(25) = 24, 24 -> A255131(24) = 21, 21 -> A255131(21) = 18, 18 -> A255131(18) = 16, thus four steps were required to reach 16, and a(16) = 4.

For n=17, when we do the same iteration, we see that we will pass by it, thus a(17) = 0.

PROG

(Scheme) (define (A278515 n) (let* ((r (A000196 n)) (end (A000290 r))) (let loop ((k (A000290 (+ 1 r))) (s 0)) (cond ((= k n) s) ((<= k end) 0) (else (loop (A255131 k) (+ 1 s)))))))

CROSSREFS

Cf. A000196, A000290, A002828, A255131.

Cf. A005563 (positions of ones), A276573 (of nonzero terms).

Sequence in context: A217540 A226861 A185643 * A285709 A080101 A025895

Adjacent sequences:  A278512 A278513 A278514 * A278516 A278517 A278518

KEYWORD

nonn

AUTHOR

Antti Karttunen, Nov 28 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 8 11:34 EST 2021. Contains 341948 sequences. (Running on oeis4.)