login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A349119 a(0) = 1; for n>0, a(n) is the smallest positive integer that has not previously occurred such that |n - a(n-1)| + a(n) is a square. 2
1, 4, 2, 3, 8, 6, 9, 7, 15, 10, 16, 11, 24, 5, 27, 13, 22, 20, 14, 31, 25, 12, 26, 33, 40, 21, 44, 19, 55, 23, 18, 36, 32, 35, 48, 51, 34, 46, 17, 42, 47, 30, 37, 43, 63, 82, 28, 45, 61, 52, 62, 38, 50, 78, 57, 79, 41, 65, 29, 70, 39, 59, 97, 66, 98, 67, 80, 68, 49, 101, 69, 119, 53, 124, 71, 60 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
a(1) = 4 as |1 - a(0)| = |1 - 1| = 0, and 0 + 4 = 4 = 2^2 is the next smallest square. Note a(1) cannot be 1 as a(0) = 1.
a(4) = 8 as |4 - a(3)| = |4 - 3| = 1, and 1 + 8 = 9 = 3^2 is the next smallest square. Note a(4) cannot be 3 as a(3) = 3.
a(8) = 15 as |8 - a(7)| = |8 - 7| = 1, and 1 + 15 = 16 = 4^2 is the next smallest square. Note a(8) cannot be 3 or 8 as these have previously occurred.
CROSSREFS
Sequence in context: A016512 A201651 A357463 * A026246 A321122 A351482
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Nov 08 2021
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 08:22 EDT 2024. Contains 371236 sequences. (Running on oeis4.)