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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005210 a(n) = |a(n-1) + 2a(n-2) - n|.
(Formerly M0400)
11
1, 1, 0, 2, 3, 1, 0, 6, 3, 5, 0, 2, 11, 1, 8, 6, 5, 1, 8, 10, 5, 3, 10, 8, 3, 7, 14, 0, 1, 29, 0, 26, 7, 25, 4, 18, 11, 9, 8, 14, 11, 3, 18, 20, 11, 5, 20, 18, 9, 5, 28, 14, 17, 9, 12, 26, 7, 1, 44, 14, 41, 7, 26, 24, 11, 7, 38, 16, 23, 15, 10, 32, 21, 11, 22, 32, 1, 13, 64, 10, 57, 5, 36, 38, 25, 15, 22, 36 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

It seems likely that every number will eventually appear.

REFERENCES

Popular Computing (Calabasas, CA), Z-Sequences, Vol. 4 (No. 42, Sep 1976), pp. 12-16.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe and N. J. A. Sloane, Table of n, a(n) for n = 1..20000 [First 1000 terms from T. D. Noe]

Popular Computing (Calabasas, CA), Z-Sequences, continued. Annotated and scanned copy of pages 14, 15, 16, 18 of Vol. 5 (No. 56, Nov 1977).

J. Shallit, Letter to N. J. A. Sloane Mar 14, 1979, concerning A001787, A005209, A005210, A005211

MAPLE

f:=proc(n) option remember;

if n <= 1 then 1 else abs(2*f(n-2)+f(n-1)-n); fi; end;

[seq(f(n), n=1..60)]; # N. J. A. Sloane, Apr 16 2015

MATHEMATICA

RecurrenceTable[{a[1]==a[2]==1, a[n]==Abs[a[n-1]+2a[n-2]-n]}, a, {n, 90}] (* Harvey P. Dale, Mar 23 2012 *)

PROG

(Haskell)

a005210 n = a005210_list !! (n-1)

a005210_list = 1 : 1 : (zipWith ((abs .) . (-))

    [3..] $ zipWith (+) (tail a005210_list) (map (2 *) a005210_list))

-- Reinhard Zumkeller, Aug 11 2014

CROSSREFS

Record values and where they occur: A005211 and A242014.

Zeros: A051202. Consecutive equal terms: A256962.

Least inverse: A051203.

Sequence in context: A144633 A264428 A256550 * A264430 A264433 A048994

Adjacent sequences:  A005207 A005208 A005209 * A005211 A005212 A005213

KEYWORD

nonn,easy,nice

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from David W. Wilson

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 February 20 08:44 EST 2019. Contains 320325 sequences. (Running on oeis4.)