login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099004 First differences of A081145. 6
1, 2, 3, -4, 5, 6, -9, 7, 8, -14, 10, 11, -18, 12, 13, -24, 15, 16, -30, 17, 19, -34, 20, 21, -39, 22, 23, -43, 25, 26, -50, 27, 28, -54, 29, 31, -57, 33, -32, 35, 36, -70, 37, 38, -73, 40, 41, -78, 42, 44, -85, 45, 46, -90, 47, 48, -94, 49, 51, -97, 52, 53, -104, 55, 56, -109, 58, 59, -116, 61, -60, 62, 63 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Does every number appear in the sequence of absolute values?

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..5000

MATHEMATICA

f[s_] := Block[{k = 1, d = Abs[Most@s - Rest@s], l = Last@s}, While[MemberQ[s, k] || MemberQ[d, Abs[l - k]], k++ ]; Append[s, k]]; t = Nest[f, {1}, 75]; Rest@t - Most@t (* Robert G. Wilson v, Jun 13 2006 *)

PROG

(Python)

A099004_list, l, s, b1, b2 = [1], 2, 3, set(), set([1])

for n in range(2, 5*10**3+1):

....i = s

....while True:

........m = abs(i-l)

........if not (i in b1 or m in b2):

............A099004_list.append(i-l)

............b1.add(i)

............b2.add(m)

............l = i

............while s in b1:

................b1.remove(s)

................s += 1

............break

........i += 1 # Chai Wah Wu, Dec 15 2014

CROSSREFS

Sequence in context: A257815 A141655 A174349 * A270194 A055170 A068384

Adjacent sequences:  A099001 A099002 A099003 * A099005 A099006 A099007

KEYWORD

sign,easy

AUTHOR

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 17 2003

EXTENSIONS

Edited by N. J. A. Sloane, Apr 08 2006

More terms from Robert G. Wilson v, Jun 13 2006

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 23 02:43 EST 2018. Contains 299473 sequences. (Running on oeis4.)