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!)
A037257 a() = 1,3,... [ A037257 ], differences = 2,... [ A037258 ] and 2nd differences [ A037259 ] are disjoint and monotonic; adjoin next free number to 2nd differences unless it would produce a duplicate in which case ignore. 15
1, 3, 9, 20, 38, 64, 100, 148, 209, 284, 374, 480, 603, 745, 908, 1093, 1301, 1533, 1790, 2075, 2389, 2733, 3108, 3515, 3955, 4429, 4938, 5484, 6069, 6694, 7360, 8068, 8819, 9614, 10454, 11340, 12273, 13255, 14287, 15370, 16505, 17693, 18935, 20232 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
27 and 250 are the first two numbers to be ignored.
I discovered this around 1979; Martin Gardner described a version of it in his 1980 article.
REFERENCES
M. Gardner, Weird Numbers from Titan, Isaac Asimov's Science Fiction Magazine, Vol. 4, No. 5, May 1980, pp. 42ff.
LINKS
EXAMPLE
After 1 3 9 20 with differences
------ 2 6 11 and 2nd differences
------- 4 5, the next free number is 7 so we get
----- 1 3 9 20 38 ...
------ 2 6 11 18 ...
------- 4 5 7 ....
MATHEMATICA
ClearAll[a]; A037257 = {a[0]=1, a[1]=3, a[2]=9}; d1 = Differences[A037257]; d2 = Differences[d1]; ignored = {}; a[n_] := a[n] = (u = Union[A037257, d1, d2, ignored]; m = MapIndexed[List, u]; sel = Select[m, #1[[1]] != #1[[2, 1]] & , 1]; For[nextFree = sel[[1, 2, 1]], True, nextFree++, an2 = nextFree; an = an2 - a[n-2] + 2*a[n-1]; an1 = an - a[n-1]; If[ FreeQ[ ignored, an2] && Length[ Join[ A037257, d1, d2, {an, an1, an2}]] == Length[ Union[ A037257, d1, d2, {an, an1, an2}]], Break[], AppendTo[ ignored, an2]] ]; AppendTo[ A037257, an]; AppendTo[d1, an1]; AppendTo[d2, an2]; an); Table[a[n], {n, 0, 43}] (* Jean-François Alcover, Sep 14 2012 *)
CROSSREFS
Sequence in context: A348090 A139142 A225385 * A145068 A293357 A202349
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Sep 25 2000
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 April 19 06:16 EDT 2024. Contains 371782 sequences. (Running on oeis4.)