Post Reply 
Puzzle: sequence without multiples of 3
09-14-2019, 01:01 AM (This post was last modified: 09-16-2019 08:13 PM by Albert Chan.)
Post: #7
RE: Puzzle: sequence without multiples of 3
Hi, Thomas Okken

You got it!

I saw the formula from a book review, The Irrationals, by Julian Havil

The formula itself is trivial, but the procedure to get it can be used for complicated sequences.

Example: for non-squares sequence
Code:
F=n²   1  4  9 16 25 36 49 64 81
n      1  2  3  4  5  6  7  8  9
f=n²-n 0  2  6 12 20 30 42 58 72
f*     1  1  2  2  2  2  3  3  3
n + f* 2  3  5  6  7  8 10 11 12

This assumed f is non-decreasing function.
f* is max k such that f(k) < n, thus we have 2x1, 4x2, 6x3, 8x4 ...

→ f*(n) = floor(√(n) + 0.5)
→ non_squares(n) = n + f* = n + floor(√(n) + 0.5)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Puzzle: sequence without multiples of 3 - Albert Chan - 09-14-2019 01:01 AM



User(s) browsing this thread: 1 Guest(s)